mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
Re-fix cargo completions
Using a local variable means we have to expand it when loading the completion. With this approach, the content of the variable will be expanded, so escape it.
This commit is contained in:
parent
db62953e0f
commit
27e88adcd5
1 changed files with 3 additions and 3 deletions
|
@ -5,10 +5,10 @@ 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 -lx __fish_cargo_subcommands (cargo --list 2>&1 | string replace -rf '^\s+([^\s]+)\s+(.*)' '$1\t$2')
|
||||
set -lx __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'
|
||||
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"
|
||||
|
||||
for x in bench build clean doc fetch generate-lockfile \
|
||||
locate-project package pkgid publish \
|
||||
|
|
Loading…
Reference in a new issue