Freddy Vulto a écrit :
On Wed, Jun 24, 2009 at 10:29 PM, Guillaume
Rousse<guillaume.rou...@inria.fr> wrote:
mandatory means 'always present', not 'not empty'. I'd prefer to keep
options for optional argument (using getopt for internal functions is
already awful enough IMHO).

That's exactly the same situation than _filedir, which is supposed to be
always called for completing a directory name, even if this one is empty. It
uses a global variable, tough... This makes room for enhancing API
consistency here.

I changed the `-h hostname' option to `_known_hosts_real' to a
mandatory argument `CWORD' in commit r25e4eb6.  Are you ok with it?
Perfect :)

What do you think about renaming `_known_hosts_real' to `_add_known_hosts'?
I don't have opposition to renaming, but I don't think using the 'add_' prefix for segregating front-end function (the ones parsing command line) from helper functions (the ones just changing COMPREPLY) function is well suited. I'd rather add another underscore for the later ones, for instance. Or another convetion.

However, using this prefix for distinguishing helper function setting or adding to COMPREPLY is fine. In this regard, we shoud rename the following ones:
- _filedir -> _add_filedirs
- _pci_ids -> _add_pc_ids
etc...
--
BOFH excuse #51:

Cosmic ray particles crashed through the hard disk platter

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

Reply via email to