[Bash-completion-devel] completion for ipv6calc
Adrian Friedli
adi at koalatux.ch
Fri Jan 15 00:12:30 UTC 2010
Hallo
On Thursday 14 January 2010 20:21:21 Ville Skyttä wrote:
> Added to git with the following changes:
>
> - Filtered cruft from --in/--out/--action completions; at least my ipv6calc
> returns more than just the options, e.g. stuff like:
>
> $ ipv6calc --action -h
> ipv6calc: version 0.72.2
> (P) & (C) 2001-2008 by Peter Bieringer <pb (at) bieringer.de>
>
> Available action types:
> auto : Automatic selection of action (default)
> geneui64 : Converts a MAC address to an EUI-64 address
> conv6to4 : Converts IPv4 address <-> 6to4 IPv6 address (prefix)
> genprivacyiid : Generates a privacy interface ID out of a given one and a
> token anonymize : Anonymize IPv4/IPv6 address without loosing much
> information prefixmac2ipv6: Generates an IPv6 address out of a prefix and
> a MAC address
You missed the -m in the call, ipv6calc will print the options in machine
readable form, just ready to use. Either remove sed or the -m.
> One remaining question: what's the "=" for in the _get_cword call, and if
> it is intentional, is it intentional that the _get_pword call doesn't have
> it?
I just tried a bit with the different combinations, and this gave me the best
results when I used long options with a "=". I don't know _get_cword and
_get_pword in detail, so I can't say anything about their correct usage.
Bye, Adi
More information about the Bash-completion-devel
mailing list