mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +00:00
[cargo] Add dynamic --package completions
[ci skip]
This commit is contained in:
parent
3062994645
commit
326fd8d750
1 changed files with 6 additions and 0 deletions
|
@ -94,3 +94,9 @@ complete -c cargo -x -n '__fish_seen_subcommand_from update' -l precise -d 'Upda
|
||||||
|
|
||||||
complete -c cargo -x -n '__fish_seen_subcommand_from yank' -l vers -d 'The version to yank or un-yank'
|
complete -c cargo -x -n '__fish_seen_subcommand_from yank' -l vers -d 'The version to yank or un-yank'
|
||||||
complete -c cargo -n '__fish_seen_subcommand_from yank' -l undo -d 'Undo a yank, putting a version back into the index'
|
complete -c cargo -n '__fish_seen_subcommand_from yank' -l undo -d 'Undo a yank, putting a version back into the index'
|
||||||
|
|
||||||
|
function __fish_cargo_packages
|
||||||
|
find . -name Cargo.toml | string replace -rf '.*/([^/]+)/?Cargo.toml' '$1'
|
||||||
|
end
|
||||||
|
complete -c cargo -n '__fish_seen_subcommand_from run test build debug check' -l package \
|
||||||
|
-xa "(__fish_cargo_packages)"
|
||||||
|
|
Loading…
Reference in a new issue