Chapter 8: Command Line Editing

129

running

Names of running jobs, if job control is active. service

Service names. May also be specified as -s. setopt

Valid arguments for the -o option to the set builtin

(see Section 4.3.1 [The Set Builtin], page 58). shopt

Shell option names as accepted by the shopt builtin

(see Section 4.2 [Bash Builtins], page 48). signal

Signal names. stopped

Names of stopped jobs, if job control is active. user

User names. May also be specified as -u. variable

Names of all shell variables. May also be specified as

-v.

-C command command is executed in a subshell environment, and its output is used as the possible completions.

-F function

The shell function function is executed in the current shell envi- ronment. When it is executed, $1 is the name of the command whose arguments are being completed, $2 is the word being com- pleted, and $3 is the word preceding the word being completed, as described above (see Section 8.6 [Programmable Completion], page 124). When it finishes, the possible completions are retrieved from the value of the COMPREPLY array variable.

-G globpat

The filename expansion pattern globpat is expanded to generate the possible completions.

-P prefix prefix is added at the beginning of each possible completion after all other options have been applied.

-S suffix suffix is appended to each possible completion after all other options have been applied.

-W wordlist

The wordlist is split using the characters in the 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.

-X filterpat filterpat is a pattern as used for filename expansion. It is applied to the list of possible completions generated by the preceding options and arguments, and each completion matching filterpat is removed from the list. A leading ‘!’ in filterpat negates the pattern; in this case, any completion not matching filterpat is removed.