Hallo I just wrote a simple completion for ipv6calc. I could not find the to_review directory in the git repository and I don't think I've got commit access, so I post it here.
Please CC me, because I'm not on this list. Cheers, Adi PS: The email address in the irc channel topic is wrong.
have ipv6calc &&
_ipv6calc()
{
local cur prev
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
case "$prev" in
-I|--in)
COMPREPLY=( $( compgen -W 'auto revnibbles.int \
revnibbles.arpa bitstring ipv6addr ipv4addr mac \
base85 ifinet6 iid+token ipv6logconv prefix+mac' \
-- "$cur" ) )
return 0
;;
-O|--out)
COMPREPLY=( $( compgen -W 'revnibbles.int \
revnibbles.arpa bitstring ipv6addr ipv4addr mac \
eui64 base85 ifinet6 iid iid+token addrtype \
ouitype ipv6addrtype any revipv4' -- "$cur" ) )
return 0
;;
-A|--action)
COMPREPLY=( $( compgen -W 'auto geneui64 conv6to4 \
genprivacyiid prefixmac2ipv6' -- "$cur" ) )
return 0
;;
esac
COMPREPLY=( $( compgen -W '--help --quiet --in --out --action \
--examples --showinfo --lowercase --uppercase \
--printprefix --printsuffix --maskprefix --masksuffix \
--printcompressed --printuncompressed \
--printfulluncompressed' -- "$cur" ) )
return 0
}
complete -F _ipv6calc ipv6calc
# ex: ts=4 sw=4 et filetype=sh
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Bash-completion-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/bash-completion-devel
