📄 builtins.0
字号:
_o_p_t_i_o_ns, which may be any option accepted by the ccoommpplleettee builtin with the exception of --pp and --rr, and write the matches to the standard output. When using the --FF or --CC 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 pro- grammable completion code had generated them directly from a completion specification with the same flags. If _w_o_r_d is speci- fied, only those completions matching _w_o_r_d will be displayed. The return value is true unless an invalid option is supplied, or no matches were generated. ccoommpplleettee [--aabbccddeeffggjjkkssuuvv] [--oo _c_o_m_p_-_o_p_t_i_o_n] [--DDEE] [--AA _a_c_t_i_o_n] [--GG _g_l_o_b_- _p_a_t] [--WW _w_o_r_d_l_i_s_t] [--FF _f_u_n_c_t_i_o_n] [--CC _c_o_m_m_a_n_d] [--XX _f_i_l_t_e_r_p_a_t] [--PP _p_r_e_f_i_x] [--SS _s_u_f_f_i_x] _n_a_m_e [_n_a_m_e _._._.] ccoommpplleettee --pprr [--DDEE] [_n_a_m_e ...] Specify how arguments to each _n_a_m_e should be completed. If the --pp 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 --rr option removes a completion spec- ification for each _n_a_m_e, or, if no _n_a_m_es are supplied, all com- pletion specifications. The --DD option indicates that the remaining options and actions should apply to the ``default'' command completion; that is, completion attempted on a command for which no completion has previously been defined. The --EE option indicates that the remaining options and actions should apply to ``empty'' command completion; that is, completion attempted on a blank line. The process of applying these completion specifications when word completion is attempted is described above under PPrroo-- ggrraammmmaabbllee CCoommpplleettiioonn. Other options, if specified, have the following meanings. The arguments to the --GG, --WW, and --XX options (and, if necessary, the --PP and --SS options) should be quoted to protect them from expan- sion before the ccoommpplleettee builtin is invoked. --oo _c_o_m_p_-_o_p_t_i_o_n The _c_o_m_p_-_o_p_t_i_o_n controls several aspects of the comp- spec's behavior beyond the simple generation of comple- tions. _c_o_m_p_-_o_p_t_i_o_n may be one of: bbaasshhddeeffaauulltt Perform the rest of the default bbaasshh completions if the compspec generates no matches. ddeeffaauulltt Use readline's default filename completion if the compspec generates no matches. ddiirrnnaammeess Perform directory name completion if the comp- spec generates no matches. ffiilleennaammeess Tell readline that the compspec generates file- names, so it can perform any filename-specific processing (like adding a slash to directory names, quoting special characters, or suppress- ing trailing spaces). Intended to be used with shell functions. nnoossppaaccee Tell readline not to append a space (the default) to words completed at the end of the line. pplluussddiirrss After any matches defined by the compspec are generated, directory name completion is attempted and any matches are added to the results of the other actions. --AA _a_c_t_i_o_n The _a_c_t_i_o_n may be one of the following to generate a list of possible completions: aalliiaass Alias names. May also be specified as --aa. aarrrraayyvvaarr Array variable names. bbiinnddiinngg RReeaaddlliinnee key binding names. bbuuiillttiinn Names of shell builtin commands. May also be specified as --bb. ccoommmmaanndd Command names. May also be specified as --cc. ddiirreeccttoorryy Directory names. May also be specified as --dd. ddiissaabblleedd Names of disabled shell builtins. eennaabblleedd Names of enabled shell builtins. eexxppoorrtt Names of exported shell variables. May also be specified as --ee. ffiillee File names. May also be specified as --ff. ffuunnccttiioonn Names of shell functions. ggrroouupp Group names. May also be specified as --gg. hheellppttooppiicc Help topics as accepted by the hheellpp builtin. hhoossttnnaammee Hostnames, as taken from the file specified by the HHOOSSTTFFIILLEE shell variable. jjoobb Job names, if job control is active. May also be specified as --jj. kkeeyywwoorrdd Shell reserved words. May also be specified as --kk. rruunnnniinngg Names of running jobs, if job control is active. sseerrvviiccee Service names. May also be specified as --ss. sseettoopptt Valid arguments for the --oo option to the sseett builtin. sshhoopptt Shell option names as accepted by the sshhoopptt builtin. ssiiggnnaall Signal names. ssttooppppeedd Names of stopped jobs, if job control is active. uusseerr User names. May also be specified as --uu. vvaarriiaabbllee Names of all shell variables. May also be spec- ified as --vv. --CC _c_o_m_m_a_n_d _c_o_m_m_a_n_d is executed in a subshell environment, and its output is used as the possible completions. --FF _f_u_n_c_t_i_o_n The shell function _f_u_n_c_t_i_o_n is executed in the current shell environment. When it finishes, the possible com- pletions are retrieved from the value of the CCOOMMPPRREEPPLLYY array variable. --GG _g_l_o_b_p_a_t The pathname expansion pattern _g_l_o_b_p_a_t is expanded to generate the possible completions. --PP _p_r_e_f_i_x _p_r_e_f_i_x is added at the beginning of each possible com- pletion after all other options have been applied. --SS _s_u_f_f_i_x _s_u_f_f_i_x is appended to each possible completion after all other options have been applied. --WW _w_o_r_d_l_i_s_t The _w_o_r_d_l_i_s_t is split using the characters in the IIFFSS 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 com- pleted. --XX _f_i_l_t_e_r_p_a_t _f_i_l_t_e_r_p_a_t is a pattern as used for pathname expansion. It is applied to the list of possible completions gener- ated by the preceding options and arguments, and each completion matching _f_i_l_t_e_r_p_a_t is removed from the list. A leading !! in _f_i_l_t_e_r_p_a_t negates the pattern; in this case, any completion not matching _f_i_l_t_e_r_p_a_t is removed. The return value is true unless an invalid option is supplied, an option other than --pp or --rr is supplied without a _n_a_m_e argu- ment, an attempt is made to remove a completion specification for a _n_a_m_e for which no specification exists, or an error occurs adding a completion specification. ccoommppoopptt [--oo _o_p_t_i_o_n] [--DDEE] [++oo _o_p_t_i_o_n] [_n_a_m_e] Modify completion options for each _n_a_m_e according to the _o_p_t_i_o_ns, or for the currently-executing completion if no _n_a_m_es are supplied. If no _o_p_t_i_o_ns are given, display the completion options for each _n_a_m_e or the current completion. The possible values of _o_p_t_i_o_n are those valid for the ccoommpplleettee builtin described above. The --DD option indicates that the remaining options should apply to the ``default'' command completion; that is, completion attempted on a command for which no completion has previously been defined. The --EE option indicates that the remaining options should apply to ``empty'' command completion; that is, completion attempted on a blank line. The return value is true unless an invalid option is supplied, an attempt is made to modify the options for a _n_a_m_e for which no completion specification exists, or an output error occurs. ccoonnttiinnuuee [_n] Resume the next iteration of the enclosing ffoorr, wwhhiillee, uunnttiill, or sseelleecctt loop. If _n is specified, resume at the _nth enclosing loop. _n must be >= 1. If _n is greater than the number of enclosing loops, the last enclosing loop (the ``top-level'' loop) is resumed. The return value is 0 unless _n is not greater than or equal to 1. ddeeccllaarree [--aaAAffFFggiillrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...] ttyyppeesseett [--aaAAffFFggiillrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...] Declare variables and/or give them attributes. If no _n_a_m_es are given then display the values of variables. The --pp option will display the attributes and values of each _n_a_m_e. When --pp is used with _n_a_m_e arguments, additional options are ignored. When --pp is supplied without _n_a_m_e arguments, it will display the attributes and values of all variables having the attributes specified by the additional options. If no other options are supplied with
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -