mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Update cargo completion (#5172)
* Update cargo completion * Show sub-command's description for completion
This commit is contained in:
parent
d00c196613
commit
0e6cc13d0d
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ complete -c cargo -l list -d 'List installed commands'
|
||||||
complete -c cargo -s v -l verbose -d 'Use verbose output'
|
complete -c cargo -s v -l verbose -d 'Use verbose output'
|
||||||
complete -c cargo -s q -l quiet -d 'No output printed to stdout'
|
complete -c cargo -s q -l quiet -d 'No output printed to stdout'
|
||||||
|
|
||||||
set __fish_cargo_subcommands (cargo --list | tail -n +2 | tr -d " ")
|
set __fish_cargo_subcommands (cargo --list | tail -n +2 | string trim | string replace -r '\s+' '\t')
|
||||||
|
|
||||||
complete -c cargo -f -c cargo -n '__fish_use_subcommand' -a '$__fish_cargo_subcommands'
|
complete -c cargo -f -c cargo -n '__fish_use_subcommand' -a '$__fish_cargo_subcommands'
|
||||||
complete -c cargo -x -c cargo -n '__fish_seen_subcommand_from help' -a '$__fish_cargo_subcommands'
|
complete -c cargo -x -c cargo -n '__fish_seen_subcommand_from help' -a '$__fish_cargo_subcommands'
|
||||||
|
|
Loading…
Reference in a new issue