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
- •
Run the following commands to gather the current CLI help output:
shcopilot --help copilot help commands copilot help config copilot help environment copilot help logging copilot help permissions copilot init --help copilot update --help copilot version --help copilot login --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 --help
- •
Compare the help output against the existing completions in
completions/copilot.fish. - •
Update
completions/copilot.fishto reflect any 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
- •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 --helpoutput under the--modelsection. - •
Validate changes:
fishfish -n completions/copilot.fish fish -n functions/__fish_copilot_models.fish
Key Files
- •
completions/copilot.fish— All CLI completions usingcomplete -c copilotsyntax - •
functions/__fish_copilot_models.fish— Dynamic model list with fallback values - •
functions/__fish_copilot_agents.fish— Dynamic agent list from~/.copilot/agents/
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 - •4 spaces indentation
- •Keep completions grouped by section with comments