⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rluser.texi

📁 android-w.song.android.widget
💻 TEXI
📖 第 1 页 / 共 5 页
字号:
@end ftable@node Miscellaneous Commands@subsection Some Miscellaneous Commands@ftable @code@item re-read-init-file (C-x C-r)Read in the contents of the @var{inputrc} file, and incorporateany bindings or variable assignments found there.@item abort (C-g)Abort the current editing command andring the terminal's bell (subject to the setting of@code{bell-style}).@item do-uppercase-version (M-a, M-b, M-@var{x}, @dots{})If the metafied character @var{x} is lowercase, run the commandthat is bound to the corresponding uppercase character.@item prefix-meta (@key{ESC})Metafy the next character typed.  This is for keyboardswithout a meta key.  Typing @samp{@key{ESC} f} is equivalent to typing@kbd{M-f}.@item undo (C-_ or C-x C-u)Incremental undo, separately remembered for each line.@item revert-line (M-r)Undo all changes made to this line.  This is like executing the @code{undo}command enough times to get back to the beginning.@ifset BashFeatures@item tilde-expand (M-&)@end ifset@ifclear BashFeatures@item tilde-expand (M-~)@end ifclearPerform tilde expansion on the current word.@item set-mark (C-@@)Set the mark to the point.  If anumeric argument is supplied, the mark is set to that position.@item exchange-point-and-mark (C-x C-x)Swap the point with the mark.  The current cursor position is set tothe saved position, and the old cursor position is saved as the mark.@item character-search (C-])A character is read and point is moved to the next occurrence of thatcharacter.  A negative count searches for previous occurrences.@item character-search-backward (M-C-])A character is read and point is moved to the previous occurrenceof that character.  A negative count searches for subsequentoccurrences.@item skip-csi-sequence ()Read enough characters to consume a multi-key sequence such as thosedefined for keys like Home and End.  Such sequences begin with aControl Sequence Indicator (CSI), usually ESC-[.  If this sequence isbound to "\e[", keys producing such sequences will have no effectunless explicitly bound to a readline command, instead of insertingstray characters into the editing buffer.  This is unbound by default,but usually bound to ESC-[.@item insert-comment (M-#)Without a numeric argument, the value of the @code{comment-begin}variable is inserted at the beginning of the current line.If a numeric argument is supplied, this command acts as a toggle:  ifthe characters at the beginning of the line do not match the valueof @code{comment-begin}, the value is inserted, otherwisethe characters in @code{comment-begin} are deleted from the beginning ofthe line.In either case, the line is accepted as if a newline had been typed.@ifset BashFeaturesThe default value of @code{comment-begin} causes this commandto make the current line a shell comment.If a numeric argument causes the comment character to be removed, the linewill be executed by the shell.@end ifset@item dump-functions ()Print all of the functions and their key bindings to theReadline output stream.  If a numeric argument is supplied,the output is formatted in such a way that it can be made partof an @var{inputrc} file.  This command is unbound by default.@item dump-variables ()Print all of the settable variables and their values to theReadline output stream.  If a numeric argument is supplied,the output is formatted in such a way that it can be made partof an @var{inputrc} file.  This command is unbound by default.@item dump-macros ()Print all of the Readline key sequences bound to macros and thestrings they output.  If a numeric argument is supplied,the output is formatted in such a way that it can be made partof an @var{inputrc} file.  This command is unbound by default.@ifset BashFeatures@item glob-complete-word (M-g)The word before point is treated as a pattern for pathname expansion,with an asterisk implicitly appended.  This pattern is used togenerate a list of matching file names for possible completions.@item glob-expand-word (C-x *)The word before point is treated as a pattern for pathname expansion,and the list of matching file names is inserted, replacing the word.If a numeric argument is supplied, a @samp{*} is appended beforepathname expansion.@item glob-list-expansions (C-x g)The list of expansions that would have been generated by@code{glob-expand-word} is displayed, and the line is redrawn.If a numeric argument is supplied, a @samp{*} is appended beforepathname expansion.@item display-shell-version (C-x C-v)Display version information about the current instance of Bash.@item shell-expand-line (M-C-e)Expand the line as the shell does.This performs alias and history expansion as well as all of the shellword expansions (@pxref{Shell Expansions}).@item history-expand-line (M-^)Perform history expansion on the current line.@item magic-space ()Perform history expansion on the current line and insert a space(@pxref{History Interaction}).@item alias-expand-line ()Perform alias expansion on the current line (@pxref{Aliases}).@item history-and-alias-expand-line ()Perform history and alias expansion on the current line.@item insert-last-argument (M-. or M-_)A synonym for @code{yank-last-arg}.@item operate-and-get-next (C-o)Accept the current line for execution and fetch the next linerelative to the current line from the history for editing.  Anyargument is ignored.@item edit-and-execute-command (C-xC-e)Invoke an editor on the current command line, and execute the result as shellcommands.Bash attempts to invoke@code{$VISUAL}, @code{$EDITOR}, and @code{emacs}as the editor, in that order.@end ifset@ifclear BashFeatures@item emacs-editing-mode (C-e)When in @code{vi} command mode, this causes a switch to @code{emacs}editing mode.@item vi-editing-mode (M-C-j)When in @code{emacs} editing mode, this causes a switch to @code{vi}editing mode.@end ifclear@end ftable@node Readline vi Mode@section Readline vi ModeWhile the Readline library does not have a full set of @code{vi}editing functions, it does contain enough to allow simple editingof the line.  The Readline @code{vi} mode behaves as specified inthe @sc{posix} standard.@ifset BashFeaturesIn order to switch interactively between @code{emacs} and @code{vi}editing modes, use the @samp{set -o emacs} and @samp{set -o vi}commands (@pxref{The Set Builtin}).@end ifset@ifclear BashFeaturesIn order to switch interactively between @code{emacs} and @code{vi}editing modes, use the command @kbd{M-C-j} (bound to emacs-editing-modewhen in @code{vi} mode and to vi-editing-mode in @code{emacs} mode).@end ifclearThe Readline default is @code{emacs} mode.When you enter a line in @code{vi} mode, you are already placed in`insertion' mode, as if you had typed an @samp{i}.  Pressing @key{ESC}switches you into `command' mode, where you can edit the text of theline with the standard @code{vi} movement keys, move to previoushistory lines with @samp{k} and subsequent lines with @samp{j}, andso forth.@ifset BashFeatures@node Programmable Completion@section Programmable Completion@cindex programmable completionWhen word completion is attempted for an argument to a command forwhich a completion specification (a @var{compspec}) has been definedusing the @code{complete} builtin (@pxref{Programmable Completion Builtins}),the programmable completion facilities are invoked. First, the command name is identified.If a compspec has been defined for that command, thecompspec is used to generate the list of possible completions for the word.If the command word is the empty string (completion attempted at thebeginning of an empty line), any compspec defined withthe @option{-E} option to @code{complete} is used.If the command word is a full pathname, a compspec for the fullpathname is searched for first.If no compspec is found for the full pathname, an attempt is made tofind a compspec for the portion following the final slash.If those searches do not result in a compspec, any compspec defined withthe @option{-D} option to @code{complete} is used as the default.Once a compspec has been found, it is used to generate the list ofmatching words.If a compspec is not found, the default Bash completiondescribed above (@pxref{Commands For Completion}) is performed.First, the actions specified by the compspec are used.Only matches which are prefixed by the word being completed arereturned.When the @option{-f} or @option{-d} option is used for filename ordirectory name completion, the shell variable @env{FIGNORE} isused to filter the matches.@xref{Bash Variables}, for a description of @env{FIGNORE}.Any completions specified by a filename expansion pattern to the@option{-G} option are generated next.The words generated by the pattern need not match the word being completed.The @env{GLOBIGNORE} shell variable is not used to filter the matches,but the @env{FIGNORE} shell variable is used.Next, the string specified as the argument to the @option{-W} optionis considered.The string is first split using the characters in the @env{IFS}special variable as delimiters.Shell quoting is honored.Each word is then expanded usingbrace expansion, tilde expansion, parameter and variable expansion,command substitution, and arithmetic expansion,as described above (@pxref{Shell Expansions}).The results are split using the rules described above(@pxref{Word Splitting}).The results of the expansion are prefix-matched against the word beingcompleted, and the matching words become the possible completions.After these matches have been generated, any shell function or commandspecified with the @option{-F} and @option{-C} options is invoked.When the command or function is invoked, the @env{COMP_LINE},@env{COMP_POINT}, @env{COMP_KEY}, and @env{COMP_TYPE} variables areassigned values as described above (@pxref{Bash Variables}).If a shell function is being invoked, the @env{COMP_WORDS} and@env{COMP_CWORD} variables are also set.When the function or command is invoked, the first argument is thename of the command whose arguments are being completed, thesecond argument is the word being completed, and the third argumentis the word preceding the word being completed on the current command line.No filtering of the generated completions against the word being completedis performed; the function or command has complete freedom in generatingthe matches.Any function specified with @option{-F} is invoked first.The function may use any of the shell facilities, including the@code{compgen} and @code{compopt} builtins described below(@pxref{Programmable Completion Builtins}), to generate the matches.It must put the possible completions in the @env{COMPREPLY} arrayvariable.Next, any command specified with the @option{-C} option is invokedin an environment equivalent to command substitution.It should print a list of completions, one per line, tothe standard output.Backslash may be used to escape a newline, if necessary.After all of the possible completions are generated, any filterspecified with the @option{-X} option is applied to the list.The filter is a pattern as used for pathname expansion; a @samp{&}in the pattern is replaced with the text of the word being completed.A literal @samp{&} may be escaped with a backslash; the backslashis removed before attempting a match.Any completion that matches the pattern will be removed from the list.A leading @samp{!} negates the pattern; in this case any completionnot matching the pattern will be removed.Finally, any prefix and suffix specified with the @option{-P} and @option{-S}options are added to each member of the completion list, and the result isreturned to the Readline completion code as the list of possiblecompletions.If the previously-applied actions do not generate any matches, and the@option{-o dirnames} option was supplied to @code{complete} when thecompspec was defined, directory name completion is attempted. If the @option{-o plusdirs} option was supplied to @code{complete} whenthe compspec was defined, directory name completion is attempted and anymatches are added to the results of the other actions.By default, if a compspec is found, whatever it generates is returned tothe completion code as the full set of possible completions.The default Bash completions are not attempted, and the Readline defaultof filename completion is disabled.If the @option{-o bashdefault} option was supplied to @code{complete} whenthe compspec was defined, the default Bash completions are attemptedif the compspec generates no matches.If the @option{-o default} option was supplied to @code{complete} when thecompspec was defined, Readline's default completion will be performedif the compspec (and, if attempted, the default Bash completions)generate no matches.When a compspec indicates that directory name completion is desired,the programmable completion functions force Readline to append a slashto completed names which are symbolic links to directories, subject tothe value of the @var{mark-directories} Readline variable, regardlessof the setting of the @var{mark-symlinked-directories} Readline variable.There is some support for dynamically modifying completions.  This ismost useful when used in combination with a default completion specifiedwith @option{-D}.  It's possible for shell functions executed as completionhandlers to indicate that completion should be retried by returning anexit status of 124.  If a shell function returns 124, and changesthe compspec associated with the command on which completion is beingattempted (supplied as the first argument when the function is executed),programmable completion restarts from the beginning, with anattempt to find a new compspec for that command.  This allows a set ofcompletions to be built dynamically as completion is attempted, rather thanbeing loaded all at once.For instance, assuming that there is a library of compspecs, each kept in afile corresponding to the name of the command, the following defaultcompletion function would load completions dynamically:@example_completion_loader()@{	. "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124@}complete -D -F _completion_loader@end example@node Programmable Completion Builtins@section Programmable Completion Builtins@cindex completion builtinsTwo builtin commands are available to manipulate the programmable completionfacilities.@table @code@item compgen@btindex compgen@example@code

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -