From 0e6cc13d0dafa5245e5f78c458925f8af6d29e8d Mon Sep 17 00:00:00 2001 From: Tang King Fai Date: Fri, 7 Sep 2018 21:29:48 +0800 Subject: [PATCH] Update cargo completion (#5172) * Update cargo completion * Show sub-command's description for completion --- share/completions/cargo.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/completions/cargo.fish b/share/completions/cargo.fish index f0f0fe61d..fbea632be 100644 --- a/share/completions/cargo.fish +++ b/share/completions/cargo.fish @@ -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 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 -x -c cargo -n '__fish_seen_subcommand_from help' -a '$__fish_cargo_subcommands'