Update Copilot CLI Fish Completions
When to Use
- When the Copilot CLI has been updated and completions may be out of date
- When asked to update, sync, or refresh the fish completions
- When new flags, subcommands, or help topics have been added to the CLI
Instructions
Enumerate the current CLI surface area from the live help output. Treat
copilot help --helpas the source of truth for help topics instead of assuming a fixed list.copilot --help copilot help --help copilot help commands copilot help config copilot help environment copilot help logging copilot help monitoring copilot help permissions copilot help providers copilot init --help copilot update --help copilot version --help copilot login --help copilot mcp --help copilot mcp add --help copilot mcp get --help copilot mcp list --help copilot mcp remove --help copilot plugin --help copilot plugin install --help copilot plugin uninstall --help copilot plugin update --help copilot plugin list --help copilot plugin marketplace --help copilot plugin marketplace add --help copilot plugin marketplace remove --help copilot plugin marketplace list --help copilot plugin marketplace browse --helpIf
copilot help --helplists additional topics beyond the current set, runcopilot help <topic>for those too.Compare the help output against the existing completions and helper functions:
completions/copilot.fish- relevant
functions/__fish_copilot_*.fishhelpers for dynamic arguments
Update
completions/copilot.fishand any relevant helper functions to reflect changes:- Add completions for new flags and options
- Remove completions for deprecated/removed flags
- Update descriptions to match current help text
- Add new subcommands or help topics
- Add or update dynamic helper functions when commands accept discoverable names (for example models, agents, marketplaces, plugins, or MCP servers)
- Use
-xfor exclusive arguments,-rfor required arguments,-fto disable file completion - Every completion needs a
-ddescription
Update the fallback model list in
functions/__fish_copilot_models.fishif the set of available models has changed. Parse the model list fromcopilot help configunder themodelsetting, since that help topic is the authoritative list.Validate changes:
fish -n completions/copilot.fish fish -n functions/*.fish # Run targeted completion probes for the surfaces you changed. complete -C"copilot --mo" complete -C"copilot help " complete -C"copilot mcp " complete -C"copilot plugin marketplace "
Key Files
completions/copilot.fish— All CLI completions usingcomplete -c copilotsyntaxfunctions/__fish_copilot_models.fish— Dynamic model list with fallback valuesfunctions/__fish_copilot_agents.fish— Dynamic agent list from~/.copilot/agents/functions/__fish_copilot_*.fish— Other dynamic argument helpers, including marketplaces, plugins, and MCP servers
Conventions
- Disable file completion with
-fwhen appropriate - Use
__fish_use_subcommandcondition for top-level subcommand completions - Use
__fish_seen_subcommand_fromcondition for subcommand-specific completions - Use the live help output as the source of truth; avoid assuming help topics or command trees are static
- 4 spaces indentation
- Keep completions grouped by section with comments