mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 23:22:53 +08:00
completions/cargo.fish: Add python fallback for jq
This commit is contained in:
parent
79f7b9f92a
commit
cbb399f2ed
@ -33,6 +33,8 @@ end
|
||||
function __fish_cargo_features
|
||||
if command -q jq
|
||||
cargo read-manifest | jq -r '.features | keys | .[]' | __fish_concat_completions
|
||||
else if set -l python (__fish_anypython)
|
||||
cargo read-manifest | command $python -Sc "import sys, json"\n"print(*json.load(sys.stdin)['features'].keys(), sep='\n')" | __fish_concat_completions
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user