[Bash-completion-devel] [Bash-completion-commits] [SCM] bash-completion branch, master, updated. cbf7e1f96387bdccdc965e5ed49de58b7dfceeef

Guillaume Rousse Guillaume.Rousse at inria.fr
Wed Dec 9 21:25:11 UTC 2009


Freddy Vulto a écrit :
> The following commit has been merged in the master branch:
> commit 6fe53ef0e65554d51e94fb7c21db2d510d8390d8
> Author: Freddy Vulto <fvulto at gmail.com>
> Date:   Wed Dec 9 22:13:56 2009 +0100
> 
>     Fixed completing perl modules containing colons
>     The solution for bash-4 is to remove the colon from COMP_WORDBREAKS:
>     
>        COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
Why doesn't remove the colon from COMP_WORDBREAKS works with bash 3 ?

>     The workaround for bash-3, or bash-4 with a colon in COMP_WORDBREAKS,
>     is to call:
>     
>       __ltrim_colon_completions "$cur"
>     
>     after completions have been put in COMPREPLY.
>     
>     See also: E13) Why does filename completion misbehave if a colon appears
>     in the filename? - Bash FAQ, http://tiswww.case.edu/php/chet/bash/FAQ
This make me think a configuration file for the project, with all the 
project-specific variables, and additional variables, such as this one, 
would be useful.

Here is the mandriva package configuration file, for instance:
# enable bash completion
ENABLE_BASH_COMPLETION=1
# enable remote cvs completion
COMP_CVS_REMOTE=
# enable remote scp completion
COMP_SCP_REMOTE=
# enable configure arguments completion
COMP_CONFIGURE_HINTS=
# enable tar archive internal path completion
COMP_TAR_INTERNAL_PATHS=
# enable wireless uid completion
COMP_IWLIST_SCAN=
# enable installed packages completion
COMP_RPM_DATABASE=

The first one enables or disables completion globally, the other just 
define some specific behaviours. It's far easier to have them in one 
unique place, than to have to read the whole FAQ for them.
-- 
BOFH excuse #44:

bank holiday - system operating credits  not recharged



More information about the Bash-completion-devel mailing list