GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
COMPGEN(1) Korn Shell COMPGEN(1)

compgen - command completion

compgen [flags] [word...]

Complete possible matches for word according to the flags, which may be an option accepted by complete with the exception of -p and -r, and write the matches to standard output. When using the -F or -C options, the shell variables set by the programmable completion facilities, while available, will not have useful values.

-A action
action may be one of the following list of completions:
alias
Equivalent to -a.
arrayvar
Array variable names.
binding
breadline` key binding names.
builtin
Equivalent to -b.
command
Equivalent to -c.
directory
Equivalent to -d.
disabled
Names of disabled shell builtins.
enabled
Names of enabled shell builtins.
export
Equivalent to -e.
file
Equivalent to -f.
function
Names of shell functions.
group
Equivalent to -g.
helptopic
Help topics as accepted by the help builtin.
hostname
Hostnames, as taken from the file specified by the HOSTFILE shell variable.
job
Equivalent to -j.
keyword
Equivalent to -k.
running
Names of running jobs if job control is active.
service
Equivalent to -s.
setopt
Valid option names as acceptered by the shopt builtin.
signal
Signal names.
stopped
Names of stopped jobs if job control is active.
user
Equivalent to -u.
variable
Equivalent to -v.

-o option
option may be one of the following list of completions:
bashdefault
perform bash default completions if there are no matches
default
Use default filename completion of there are no matches.
dirnames
Perform directory name completion if there are no matches.
filenames
Match file names.
nospace
No space will be appended to words completed at the end of the line.

-G globpat
The filename expansion pattern globpat is expanded to generate the possible completions.
-W wordlist
The wordlist is split using the characters in IFS as delimiters, and the resultant word is expanded. The possible completions are the members of the resultant list which match the word being completed.
-C command
command is executed in a subshell environment, and its output is used as the possible completions.
-D
Use this completion as a default for commands that don't have a completion specified.
-E
Use this completion when for a blank line.
-F function
The shell function function is executed in the current environment. When it finishes the possible list of completions are retrieved from the indexed array variable COMPREPLY.
-X pattern
pattern is used to filter filename expansions. It is applied to the list of possible completions generated by the preceding options and arguments, and each completion matching pattern is removed from the list. A leading ! in pattern negates the pattern.
-P prefix
prefix is prepended to 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.
-a
Generate the list of alias names.
-b
Generate the list of builtins.
-c
Generate the list of command names.
-d
Generate the list of directory names.
-e
Generate the list of exported variable names.
-f
Generate the list of file names.
-g
Generate the list of group names.
-j
Generate the list of job names if job control is active.
-k
Generate the list of shell reserved words.
-s
Generate the list of service names.
-u
Generate the list of user names.
-v
Generate the list of variable names.

0
No errors occurred.
>0
An error occurred.

complete(1), readonly(1), export(1)

David J. Korn, et. al.

2019, David J. Korn, et.al.
October 3, 2019

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.