[Bash-completion-devel] abook(1) completion

gibboris at gmail.com gibboris at gmail.com
Sun Oct 25 12:56:09 UTC 2009


You're right,
this version uses the compatible case syntax and conditionnals about
compopt. (compopt -o filenames should be in _filedir
but bash-4.0-p35 still bugs on compopt +o)
About $compopt (which would just replace $BASH_VERSINFO isn't) I personaly
don't feel the need of a $compopt.

Raph

On Fri, Oct 23, 2009 at 06:31:10PM +0300, Ville Skyttä wrote:
> On Friday 23 October 2009, gibboris at gmail.com wrote:
> > Oups, missing attachment.
> 
> Please update it to use the current indentation (no tabs, indent step 4 
> spaces).
> 
> It uses "_have" instead of "have", is that a typo?
> 
> --outfile and --infile should probably be removed from the latter "case" 
> block's last glob because they have separate cases above it.
> 
> > About the missing killer feature : compopt of course.
> > It's so easy to complete with filenames then smoothly switch
> > to nospace when it comes to long_opt...
> 
> But isn't this one of the features that can be easily used just by guarding it 
> with a ${BASH_VERSINFO[0]} check?  For example instead of blindly doing the 
> compopt, do something like
> 
>     [ ${BASH_VERSINFO[0]} -ge 4 ] && compopt -o nospace
> 
> (Current bash-completion sets the $compopt variable with the intention for it 
> to ease this task; unfortunately it's pretty much useless at the moment 
> because it gets unset at and of bash_completion and is thus only available at 
> parse time, not runtime.  And we have plans to drop a bunch of global 
> variables that clutter people's envs so I haven't bothered to "fix" it.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: abook.sh
Type: application/x-sh
Size: 1407 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20091025/65746ae1/attachment.sh>


More information about the Bash-completion-devel mailing list