From ad674c61dcf4f769626147e0d8325a4754aeb054 Mon Sep 17 00:00:00 2001 From: triallax Date: Tue, 13 Aug 2024 00:53:01 +0100 Subject: [PATCH] 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). --- share/completions/apk.fish | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/completions/apk.fish b/share/completions/apk.fish index 4d8fd6a9c..928e9956f 100644 --- a/share/completions/apk.fish +++ b/share/completions/apk.fish @@ -1,10 +1,10 @@ # Completions for apk (Alpine Package Keeper) # 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 manifest" -a "(apk info -q)" -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 del fix version" -a "(apk info -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 2>/dev/null)" -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 2>/dev/null)" -d Package # Global options complete -f -c apk -s h -l help -d "Show help"