xbox commands, options, and
values from a fixed list.
<shell> is bash, zsh, fish, or powershell. The command writes the script to stdout
and exits 0. It makes no network request and doesn’t need you to sign in. It doesn’t accept
--output table.
What completes
- Commands and subcommands at every depth, such as
playtoplayfaborplaytest. - The options a command takes, including the global ones.
- Values from a fixed list, such as
--outputformats,--supported-devicevalues, the--scopevalues ofxbl configcommands, the--viewvalues ofxbl config download, and the keyscontext setandcontext unsettake.
Enable completion
Add the line for your shell to its startup file, then open a new terminal. To try it in the current terminal first, run the same line there. Bash, in~/.bashrc:
~/.zshrc, after compinit runs:
~/.config/fish/config.fish:
$PROFILE names:
xbox, so the CLI must be on PATH under that name.
How it works
Each script asks the CLI for candidates whenever you press Tab, by runningxbox with the
command line typed so far. The CLI answers from its own command tree. It doesn’t read
configuration or saved context, sign you in, send telemetry, or write anything.