diff options
author | Gabriel F. T. Gomes <gabriel@inconstante.eti.br> | 2017-09-25 23:46:54 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gabriel@inconstante.eti.br> | 2017-09-25 23:46:54 -0300 |
commit | 6d88f1055806932d9291f96847d2b691cccda2cd (patch) | |
tree | 0ff79eedaa8a239331256048981deedbd0721965 /completions/ipv6calc | |
parent | 059a87a5936cfebfd2d71ab8057002cafb2ea051 (diff) | |
download | bash-completion-6d88f1055806932d9291f96847d2b691cccda2cd.tar.gz |
New upstream version 2.7upstream/2.7
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 |