[Bash-completion-devel] Any common recipe for parsing command line options?

Guillaume Rousse Guillaume.Rousse at inria.fr
Fri Apr 30 07:55:17 UTC 2010


Le 30/04/2010 08:22, Alun Evans a écrit :
> if I do:
> 
>  cmd -<TAB>
> 
> I'd like to generate:
>   -f --file -o --output -v --verbose
> 
> but if I do:
> 
>  cmd -f foo -<TAB>
> or:
>  cmd --file foo -<TAB>
> 
> I'd like to see:
>   -o --output -v --verbose
> 
> I could cook something up, but I'm thinking this is a very common task, and wondering if it's been done already.
So your point is just altering options list, to remove already used
ones, right ?

I know subversion completion uses a similar behaviour, to remove
antagonist options. Otherwise, I don't see any other example.

-- 
BOFH excuse #95:

Pentium FDIV bug

-------------- 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/20100430/dbabee2a/attachment.bin>


More information about the Bash-completion-devel mailing list