Name
complete
Synopsis
complete [string [word/pattern/list[:select]/[suffix]]]List all completions, or, if specified, all completions for
string (which may be a pattern). Further
options can be specified.
Options for word
- c
Complete current word only, without referring to
pattern.- C
Complete current word only, referring to
pattern.- n
Complete previous word.
- N
Complete word before previous word.
- p
Expect
patternto be a range of numbers. Perform completion within that range.
Options for list
Various lists of strings can be searched
for possible completions. Some list
options include:
- (
string) Members of the list
string- $
variable Words from
variable- `
command` Output from
command- a
Aliases
- b
Bindings
- c
Commands
- C
External (not built-in) commands
- d
Directories
- D
Directories whose names begin with
string- e
Environment variables
- f
Filenames
- F
Filenames that begin with
string- g
Groups
- j
Jobs
- l
Limits
- n
Nothing
- s
Shell variables
- S
Signals
- t
Text files
- T
Text files whose names begin with
string- u
Users
- v
Any variables
- x
Like
n, but printsselectas an explanation with the editor command list-choices- X
Completions
select
select should be a glob pattern. Completions are limited to words that match this pattern. suffix is appended to all completions.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access