diff options
Diffstat (limited to 'builtins/complete.def')
-rw-r--r-- | builtins/complete.def | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/builtins/complete.def b/builtins/complete.def index a859b88f..56f87549 100644 --- a/builtins/complete.def +++ b/builtins/complete.def @@ -1,7 +1,7 @@ This file is complete.def, from which is created complete.c. It implements the builtins "complete" and "compgen" in Bash. -Copyright (C) 1999-2003 Free Software Foundation, Inc. +Copyright (C) 1999-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -24,12 +24,14 @@ $PRODUCES complete.c $BUILTIN complete $DEPENDS_ON PROGRAMMABLE_COMPLETION $FUNCTION complete_builtin -$SHORT_DOC complete [-abcdefgjksuv] [-pr] [-o option] [-A action] [-G globpat] [-W wordlist] [-P prefix] [-S suffix] [-X filterpat] [-F function] [-C command] [name ...] +$SHORT_DOC complete [-abcdefgjksuv] [-pr] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...] For each NAME, specify how arguments are to be completed. If the -p option is supplied, or if no options are supplied, existing completion specifications are printed in a way that allows them to be reused as input. The -r option removes a completion specification for each NAME, or, if no NAMEs are supplied, all completion specifications. +When completion is attempted, the actions are applied in the order the +uppercase-letter options are listed above. $END #include <config.h> @@ -71,8 +73,8 @@ static int print_cmd_completions __P((WORD_LIST *)); static char *Garg, *Warg, *Parg, *Sarg, *Xarg, *Farg, *Carg; -static struct _compacts { - char *actname; +static const struct _compacts { + const char * const actname; int actflag; int actopt; } compacts[] = { @@ -104,8 +106,8 @@ static struct _compacts { }; /* This should be a STRING_INT_ALIST */ -static struct _compopt { - char *optname; +const static struct _compopt { + const char * const optname; int optflag; } compopts[] = { { "bashdefault", COPT_BASHDEFAULT }, @@ -531,7 +533,7 @@ print_cmd_completions (list) $BUILTIN compgen $DEPENDS_ON PROGRAMMABLE_COMPLETION $FUNCTION compgen_builtin -$SHORT_DOC compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-P prefix] [-S suffix] [-X filterpat] [-F function] [-C command] [word] +$SHORT_DOC compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word] Display the possible completions depending on the options. Intended to be used from within a shell function generating possible completions. If the optional WORD argument is supplied, matches against WORD are |