Update cargo completion (#5172)

* Update cargo completion

* Show sub-command's description for completion
This commit is contained in:
Tang King Fai 2018-09-07 21:29:48 +08:00 committed by Fabian Homborg
parent d00c196613
commit 0e6cc13d0d

View file

@ -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'