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, [email protected] 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.)
abook.sh
Description: Bourne shell script
_______________________________________________ Bash-completion-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/bash-completion-devel
