[Bash-completion-devel] completion for ipv6calc
Ville Skyttä
ville.skytta at iki.fi
Sat Jan 16 09:38:41 UTC 2010
On Friday 15 January 2010, Freddy Vulto wrote:
> Maybe we'd also better merge _get_cword and _get_pword together to a new:
>
> _get_cwords_by_ref 'nonwordbreakchars' cur [prev [prevprev] ...]
>
> with `prev', `prevprev', etc. being optional arguments.
>
> This circumvents doing the same cwords-parsing repeatedly when calling
> both _get_cword and _get_pword. This also fixes situations where
> `nonwordbreakchars' passed to _get_cword and _get_pword aren't the same,
> which they should be. Plus it saves us a subshell call and we have
> consistent naming.
Sounds good to me, even better if it was necessary to specify
nonwordbreakchars only when one actually needs to, like
_get_cwords_by_ref [-n 'nonwordbreakchars'] cur [prev [prevprev] ...]
More information about the Bash-completion-devel
mailing list