fix(shell-completion): discard error messages

This commit is contained in:
Eisuke Kawashima
2025-07-14 20:24:26 +09:00
parent 86fff7fb38
commit c2b0f637c2
18 changed files with 36 additions and 34 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ __contains_word () {
}
__get_links() {
networkctl list --no-legend --no-pager --all --full | { while read -r a b c; do echo " $b"; done; }
networkctl list --no-legend --no-pager --all --full 2>/dev/null | { while read -r a b c; do echo " $b"; done; }
}
__get_links_with_prefix() {
@@ -70,7 +70,7 @@ _networkctl() {
if __contains_word "$prev" ${OPTS[ARG]}; then
case $prev in
--json)
comps=$(networkctl --json=help)
comps=$(networkctl --json=help 2>/dev/null)
;;
*)
return 0