]> git.ipfire.org Git - thirdparty/ipset.git/commitdiff
Bash completion utility updated
authorJozsef Kadlecsik <kadlec@netfilter.org>
Thu, 14 Dec 2023 11:13:25 +0000 (12:13 +0100)
committerJozsef Kadlecsik <kadlec@netfilter.org>
Thu, 14 Dec 2023 11:13:25 +0000 (12:13 +0100)
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
utils/ipset_bash_completion/ipset

index 26282c8bc1222e1efea697d08773023e43a83407..d258be234806396a5da14963b0c7a0caaae0e823 100644 (file)
@@ -362,7 +362,7 @@ _ipset_get_ifnames() {
 while read -r; do
     REPLY="${REPLY#*: }"
     printf "%s\n" ${REPLY%%:*}
-done < <(( PATH=${PATH}:/sbin command ip -o link show ) 2>/dev/null)
+done < <(PATH=${PATH}:/sbin ( command ip -o link show ) 2>/dev/null)
 }
 
 _ipset_get_iplist() {
@@ -1130,9 +1130,9 @@ if [[ $prev = @(-o|-output) ]]; then
     # make sure it's not a filename named -o or -output
     if [[ $str_filename != $prev ]]; then
         if ((names_only || headers_only)); then
-            COMPREPLY=( $( compgen -W 'plain xml json' -- "$cur" ) )
+            COMPREPLY=( $( compgen -W 'plain xml' -- "$cur" ) )
         else
-            COMPREPLY=( $( compgen -W 'plain save xml json' -- "$cur" ) )
+            COMPREPLY=( $( compgen -W 'plain save xml' -- "$cur" ) )
         fi
         return 0
     fi