[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Two builtin commands are available to manipulate the programmable completion facilities.
compgen
|
Generate possible completion matches for word according to
the options, which may be any option accepted by the
complete
builtin with the exception of `-p' and `-r', and write
the matches to the standard output.
When using the `-F' or `-C' options, the various shell variables
set by the programmable completion facilities, while available, will not
have useful values.
The matches will be generated in the same way as if the programmable completion code had generated them directly from a completion specification with the same flags. If word is specified, only those completions matching word will be displayed.
The return value is true unless an invalid option is supplied, or no matches were generated.
complete
|
Specify how arguments to each name should 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.
The process of applying these completion specifications when word completion is attempted is described above (see section 8.6 Programmable Completion).
Other options, if specified, have the following meanings.
The arguments to the `-G', `-W', and `-X' options
(and, if necessary, the `-P' and `-S' options)
should be quoted to protect them from expansion before the
complete
builtin is invoked.
-o comp-option
default
dirnames
filenames
-A action
alias
arrayvar
binding
builtin
command
directory
disabled
enabled
export
file
function
group
helptopic
help
builtin (see section 4.2 Bash Builtin Commands).
hostname
HOSTFILE
shell variable (see section 5.2 Bash Variables).
job
keyword
running
setopt
set
builtin
(see section 4.3 The Set Builtin).
shopt
shopt
builtin
(see section 4.2 Bash Builtin Commands).
signal
stopped
user
variable
-G globpat
-W wordlist
IFS
special variable as delimiters, and each resultant word
is expanded.
The possible completions are the members of the resultant list which
match the word being completed.
-C command
-F function
COMPREPLY
array variable.
-X filterpat
-P prefix
-S suffix
The return value is true unless an invalid option is supplied, an option other than `-p' or `-r' is supplied without a name argument, an attempt is made to remove a completion specification for a name for which no specification exists, or an error occurs adding a completion specification.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |