mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 13:23:09 +00:00
Improve apk completions for apk 3.x
- -q silenced warnings in apk 2.x but not in in 3.x, so redirect stderr to /dev/null to avoid seeing warnings while completing (-q is still passed to `apk search` as it strips package versions and releases) - Drop `-q` from `apk info`, as on apk 3.x it prevents apk info from outputting anything at all I've tested these changes on both Chimera Linux (which uses apk 3.x) and Alpine Linux (which is still using 2.x).
This commit is contained in:
parent
7883de6562
commit
ad674c61dc
1 changed files with 4 additions and 4 deletions
|
@ -1,10 +1,10 @@
|
||||||
# Completions for apk (Alpine Package Keeper)
|
# Completions for apk (Alpine Package Keeper)
|
||||||
|
|
||||||
# Package name
|
# Package name
|
||||||
complete -c apk -n "__fish_seen_subcommand_from add" -a "(apk search -q)" -d Package
|
complete -c apk -n "__fish_seen_subcommand_from add" -a "(apk search -q 2>/dev/null)" -d Package
|
||||||
complete -c apk -n "__fish_seen_subcommand_from manifest" -a "(apk info -q)" -d Package
|
complete -c apk -n "__fish_seen_subcommand_from manifest" -a "(apk info 2>/dev/null)" -d Package
|
||||||
complete -f -c apk -n "__fish_seen_subcommand_from info fetch dot" -a "(apk search -q)" -d Package
|
complete -f -c apk -n "__fish_seen_subcommand_from info fetch dot" -a "(apk search -q 2>/dev/null)" -d Package
|
||||||
complete -f -c apk -n "__fish_seen_subcommand_from del fix version" -a "(apk info -q)" -d Package
|
complete -f -c apk -n "__fish_seen_subcommand_from del fix version" -a "(apk info 2>/dev/null)" -d Package
|
||||||
|
|
||||||
# Global options
|
# Global options
|
||||||
complete -f -c apk -s h -l help -d "Show help"
|
complete -f -c apk -s h -l help -d "Show help"
|
||||||
|
|
Loading…
Reference in a new issue