diff options
Diffstat (limited to 'completions/ipv6calc')
-rw-r--r-- | completions/ipv6calc | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/completions/ipv6calc b/completions/ipv6calc index 5db7271f..0dacff94 100644 --- a/completions/ipv6calc +++ b/completions/ipv6calc @@ -7,25 +7,25 @@ _ipv6calc() case "$prev" in -d|--debug) - return 0 + return ;; -I|--in|-O|--out|-A|--action) # With ipv6calc < 0.73.0, -m does nothing here, so use sed instead. - COMPREPLY=( $( compgen -W "$( ipv6calc "$prev" -h 2>&1 | \ - sed -ne 's/^[[:space:]]\{1,\}\([^[:space:]:]\{1,\}\)[[:space:]]*:.*/\1/p' )" \ + COMPREPLY=( $( compgen -W "$( $1 "$prev" -h 2>&1 | \ + command sed -ne 's/^[[:space:]]\{1,\}\([^[:space:]:]\{1,\}\)[[:space:]]*:.*/\1/p' )" \ -- "$cur" ) ) - return 0 + return ;; --db-geoip|--db-ip2location-ipv4|--db-ip2location-ipv6) _filedir - return 0 + return ;; --printstart|--printend) - return 0 + return ;; esac - $split && return 0 + $split && return if [[ "$cur" == -* ]]; then COMPREPLY=( $( compgen -W '--help --debug --quiet --in --out --action @@ -35,11 +35,9 @@ _ipv6calc() --masksuffix --printstart --printend --printcompressed --printuncompressed --printfulluncompressed --printmirrored' \ -- "$cur" ) ) - return 0 fi - return 0 } && complete -F _ipv6calc ipv6calc -# ex: ts=4 sw=4 et filetype=sh +# ex: filetype=sh |