On Mon, 4 Feb 2013 11:01:48 +0100
"Dr. med. Christoph Gille" <christoph.gi...@charite.de> wrote:

> I am new to this list and need help.
> 
> I am writing a bash completion for a program. The option -aligner=...
> takes one from a list of words.
> 
> For instance -aligner=t_coffee  -aligner=clustalw
> 
> It should work from version 3 to on newest bash.
> 
> Do you know a simple example of a script from where I could
> learn how to do it?

Start from reading "Programmable Completion" section in bash manual,
then proceed to `compgen' and `complete' builtin commands description.
If you plan to integrate your completion with bash-completion, then
there are plenty of example scripts for you to learn from in the
bash-completion distribution. If you don't want to depend on 
bash-completion, then I'd recommend to look into this completion:

 
http://code.google.com/p/sbopkg/source/browse/trunk/src/usr/doc/contrib/sbopkg.bash

it's simple and quite clear.


-- Igor

_______________________________________________
Bash-completion-devel mailing list
Bash-completion-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-devel

Reply via email to