[Bash-completion-devel] ifscheme-ifupdown completion suggestions

Raph gibboris at gmail.com
Sun May 24 22:04:40 UTC 2009


Hello,
I just installed ifscheme to manage several
network profiles.
I noticed that (in the debian sid package, not git) :

1) _ifscheme should use have() &&

2) Doesn't :
	cur=`_get_cword`
   better than
        cur=${COMP_WORDS[COMP_CWORD]}
   ?

3) The _ifscheme completion should probably use
/sbin/ifscheme -l
or, at least, the sed expression ifscheme itself uses.

4) If _ifscheme is used (one mapping line) or
(more dirty) [ -x /sbin/ifscheme ], then
ifupdown should complete with the these lines and no
more with the iface ones.

Currently, it's the contrary which happens :
ifscheme h<TAB> is completed with "home" (nice)
but then,
ifup w<TAB> is completed with "wlan0-" when it
should complete with "wlan0" only.

Of course, I may be advised to workaround by naming
the mappings with something totally different of the
iface name as (it seems that) ifscheme matches
against .*${scheme} but anyway ...

Best regards.

Raph



More information about the Bash-completion-devel mailing list