[Bash-completion-devel] using external helpers for completion

Guillaume Rousse Guillaume.Rousse at inria.fr
Sun Nov 7 00:24:27 UTC 2010


Le 31/10/2010 23:59, Freddy Vulto a écrit :
> The remaining error reported by the test suite however, was that perldoc
> option-completion is now missing; it's not in the pure perl perldoc
> completion helper, whereas the code underneath was in the bash perldoc
> completion:
> 
> -    if [[ "$cur" == -* ]]; then
> -        COMPREPLY=( $( compgen -W '-C -s -T -u -U -W -X -h -v -V -c -w -d \
> -            -D -p -n -a -F -l -0 -I -m -M -P -S -x -i -e ' -- "$cur" ) )
> 
> Are you aware of that?  Anyway, I removed the test case from the test suite for
> now.
Good catch, I didn't notice.

I just fixed this, and also generalized the helper to be used for perl
command also. Now we have 100% pure perl completions for those commands,
allowing to get rid of ugly perl oneliners embedded in shell functions
for listing perl modules. However, we also have to reimplement compgen
-d, and filedirs, with no garanty of providing a consistent behaviour :/

I wonder if the correct solution would be to keep a shell completion
functions, and only delegate the specialized parts (modules and function
completions) to external perl code.
-- 
BOFH excuse #281:

The co-locator cannot verify the frame-relay gateway to the ISDN server.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4251 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20101107/47e2b17a/attachment.bin>


More information about the Bash-completion-devel mailing list