From 7d34908baaf911ac445c8b62b723bbb152b38671 Mon Sep 17 00:00:00 2001 From: Alexander Sieg Date: Fri, 3 Dec 2021 12:06:46 +0100 Subject: [PATCH] Complete cargo subcommands without description Cargo subcommand extensions don't provide a description in `cargo --list`, the regex used to filter this list ignored lines without a description. This change fixes that. --- 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 2ab4a3726..3c1f8c54d 100644 --- a/share/completions/cargo.fish +++ b/share/completions/cargo.fish @@ -1,7 +1,7 @@ # Tab completion for cargo (https://github.com/rust-lang/cargo). ## --- WRITTEN MANUALLY --- -set -l __fish_cargo_subcommands (cargo --list 2>&1 | string replace -rf '^\s+([^\s]+)\s+(.*)' '$1\t$2' | string escape) +set -l __fish_cargo_subcommands (cargo --list 2>&1 | string replace -rf '^\s+([^\s]+)\s*(.*)' '$1\t$2' | string escape) 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"