mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-05 04:47:57 +08:00
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.
This commit is contained in:
parent
3700247b55
commit
7d34908baa
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user