- 论坛徽章:
- 0
|
本帖最后由 jiannma 于 2010-09-13 19:46 编辑
回复 2# nxlinux
test@cal ~: man complete
complete [-abcdefgjksuv] [-o comp-option] [-A action] [-G globpat] [-W wordlist] [-P prefix] [-S suffix]
[-X filterpat] [-F function] [-C command] name [name ...]
complete -pr [name ...]
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
specifica- tions.
The process of applying these completion specifications when word completion is attempted is described above
under 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
The comp-option controls several aspects of the compspec’s behavior beyond the simple generation
of completions. comp-option may be one of:
bashdefault
Perform the rest of the default bash completions if the compspec generates no matches.
default Use readline’s default filename completion if the compspec generates no matches.
dirnames
Perform directory name completion if the compspec generates no matches.
filenames
Tell readline that the compspec generates filenames, so it can perform any filename-specific
processing (like adding a slash to directory names or suppressing trailing spaces). Intended to
be used with shell functions.
-F function
The shell function function is executed in the current shell environment. When it finishes, the
possible completions are retrieved from the value of the COMPREPLY array variable. |
|