4
local cur prev split=false
7
_get_comp_words_by_ref -n = cur prev
11
_split_longopt && split=true
17
-I|--in|-O|--out|-A|--action)
18
# With ipv6calc < 0.73.0, -m does nothing here, so use sed instead.
19
COMPREPLY=( $( compgen -W "$( ipv6calc "$prev" -h 2>&1 | \
20
sed -ne 's/^[[:space:]]\{1,\}\([^[:space:]:]\{1,\}\)[[:space:]]*:.*/\1/p' )" \
24
--db-geoip|--db-ip2location-ipv4|--db-ip2location-ipv6)
28
--printstart|--printend)
35
if [[ "$cur" == -* ]]; then
36
COMPREPLY=( $( compgen -W '--help --debug --quiet --in \
37
--out --action --examples --showinfo --show_types \
38
--machine_readable --db-geoip --db-geoip-default \
39
--db-ip2location-ipv4 --db-ip2location-ipv6 \
40
--lowercase --uppercase --printprefix --printsuffix \
41
--maskprefix --masksuffix --printstart --printend \
42
--printcompressed --printuncompressed \
43
--printfulluncompressed --printmirrored' -- "$cur" ) )
49
complete -F _ipv6calc ipv6calc
54
# sh-indent-comment: t
55
# indent-tabs-mode: nil
57
# ex: ts=4 sw=4 et filetype=sh