📄 rluser.texi
字号:
@item end-of-history (M->)Move to the end of the input history, i.e., the line currentlybeing entered.@item reverse-search-history (C-r)Search backward starting at the current line and moving `up' throughthe history as necessary. This is an incremental search.@item forward-search-history (C-s)Search forward starting at the current line and moving `down' throughthe the history as necessary. This is an incremental search.@item non-incremental-reverse-search-history (M-p)Search backward starting at the current line and moving `up'through the history as necessary using a non-incremental searchfor a string supplied by the user.@item non-incremental-forward-search-history (M-n)Search forward starting at the current line and moving `down'through the the history as necessary using a non-incremental searchfor a string supplied by the user.@item history-search-forward ()Search forward through the history for the string of charactersbetween the start of the current line and the point.This is a non-incremental search.By default, this command is unbound.@item history-search-backward ()Search backward through the history for the string of charactersbetween the start of the current line and the point. Thisis a non-incremental search. By default, this command is unbound.@item yank-nth-arg (M-C-y)Insert the first argument to the previous command (usuallythe second word on the previous line) at point.With an argument @var{n},insert the @var{n}th word from the previous command (the wordsin the previous command begin with word 0). A negative argumentinserts the @var{n}th word from the end of the previous command.Once the argument @var{n} is computed, the argument is extractedas if the @samp{!@var{n}} history expansion had been specified.@item yank-last-arg (M-. or M-_)Insert last argument to the previous command (the last word of theprevious history entry).With a numeric argument, behave exactly like @code{yank-nth-arg}.Successive calls to @code{yank-last-arg} move back through the historylist, inserting the last word (or the word specified by the argument tothe first call) of each line in turn.Any numeric argument supplied to these successive calls determinesthe direction to move through the history. A negative argument switchesthe direction through the history (back or forward).The history expansion facilities are used to extract the last argument,as if the @samp{!$} history expansion had been specified.@end ftable@node Commands For Text@subsection Commands For Changing Text@ftable @code@item delete-char (C-d)Delete the character at point. If point is at thebeginning of the line, there are no characters in the line, andthe last character typed was not bound to @code{delete-char}, thenreturn @sc{eof}.@item backward-delete-char (Rubout)Delete the character behind the cursor. A numeric argument meansto kill the characters instead of deleting them.@item forward-backward-delete-char ()Delete the character under the cursor, unless the cursor is at theend of the line, in which case the character behind the cursor isdeleted. By default, this is not bound to a key.@item quoted-insert (C-q or C-v)Add the next character typed to the line verbatim. This ishow to insert key sequences like @kbd{C-q}, for example.@ifclear BashFeatures@item tab-insert (M-@key{TAB})Insert a tab character.@end ifclear@item self-insert (a, b, A, 1, !, @dots{})Insert yourself.@item transpose-chars (C-t)Drag the character before the cursor forward overthe character at the cursor, moving thecursor forward as well. If the insertion pointis at the end of the line, then thistransposes the last two characters of the line.Negative arguments have no effect.@item transpose-words (M-t)Drag the word before point past the word after point,moving point past that word as well.If the insertion point is at the end of the line, this transposesthe last two words on the line.@item upcase-word (M-u)Uppercase the current (or following) word. With a negative argument,uppercase the previous word, but do not move the cursor.@item downcase-word (M-l)Lowercase the current (or following) word. With a negative argument,lowercase the previous word, but do not move the cursor.@item capitalize-word (M-c)Capitalize the current (or following) word. With a negative argument,capitalize the previous word, but do not move the cursor.@item overwrite-mode ()Toggle overwrite mode. With an explicit positive numeric argument,switches to overwrite mode. With an explicit non-positive numericargument, switches to insert mode. This command affects only@code{emacs} mode; @code{vi} mode does overwrite differently.Each call to @code{readline()} starts in insert mode.In overwrite mode, characters bound to @code{self-insert} replacethe text at point rather than pushing the text to the right.Characters bound to @code{backward-delete-char} replace the characterbefore point with a space.By default, this command is unbound.@end ftable@node Commands For Killing@subsection Killing And Yanking@ftable @code@item kill-line (C-k)Kill the text from point to the end of the line.@item backward-kill-line (C-x Rubout)Kill backward to the beginning of the line.@item unix-line-discard (C-u)Kill backward from the cursor to the beginning of the current line.@item kill-whole-line ()Kill all characters on the current line, no matter where point is.By default, this is unbound.@item kill-word (M-d)Kill from point to the end of the current word, or if betweenwords, to the end of the next word.Word boundaries are the same as @code{forward-word}.@item backward-kill-word (M-@key{DEL})Kill the word behind point.Word boundaries are the same as @code{backward-word}.@ifset BashFeatures@item shell-kill-word ()Kill from point to the end of the current word, or if betweenwords, to the end of the next word.Word boundaries are the same as @code{shell-forward-word}.@item shell-backward-kill-word ()Kill the word behind point.Word boundaries are the same as @code{shell-backward-word}.@end ifset@item unix-word-rubout (C-w)Kill the word behind point, using white space as a word boundary.The killed text is saved on the kill-ring.@item unix-filename-rubout ()Kill the word behind point, using white space and the slash characteras the word boundaries.The killed text is saved on the kill-ring.@item delete-horizontal-space ()Delete all spaces and tabs around point. By default, this is unbound.@item kill-region ()Kill the text in the current region.By default, this command is unbound.@item copy-region-as-kill ()Copy the text in the region to the kill buffer, so it can be yankedright away. By default, this command is unbound.@item copy-backward-word ()Copy the word before point to the kill buffer.The word boundaries are the same as @code{backward-word}.By default, this command is unbound.@item copy-forward-word ()Copy the word following point to the kill buffer.The word boundaries are the same as @code{forward-word}.By default, this command is unbound.@item yank (C-y)Yank the top of the kill ring into the buffer at point.@item yank-pop (M-y)Rotate the kill-ring, and yank the new top. You can only do this ifthe prior command is @code{yank} or @code{yank-pop}.@end ftable@node Numeric Arguments@subsection Specifying Numeric Arguments@ftable @code@item digit-argument (@kbd{M-0}, @kbd{M-1}, @dots{} @kbd{M--})Add this digit to the argument already accumulating, or start a newargument. @kbd{M--} starts a negative argument.@item universal-argument ()This is another way to specify an argument.If this command is followed by one or more digits, optionally with aleading minus sign, those digits define the argument.If the command is followed by digits, executing @code{universal-argument}again ends the numeric argument, but is otherwise ignored.As a special case, if this command is immediately followed by acharacter that is neither a digit or minus sign, the argument countfor the next command is multiplied by four.The argument count is initially one, so executing this function thefirst time makes the argument count four, a second time makes theargument count sixteen, and so on.By default, this is not bound to a key.@end ftable@node Commands For Completion@subsection Letting Readline Type For You@ftable @code@item complete (@key{TAB})Attempt to perform completion on the text before point.The actual completion performed is application-specific.@ifset BashFeaturesBash attempts completion treating the text as a variable (if thetext begins with @samp{$}), username (if the text begins with@samp{~}), hostname (if the text begins with @samp{@@}), orcommand (including aliases and functions) in turn. If none of these produces a match, filename completion is attempted.@end ifset@ifclear BashFeaturesThe default is filename completion.@end ifclear@item possible-completions (M-?)List the possible completions of the text before point.When displaying completions, Readline sets the number of columns usedfor display to the value of @code{completion-display-width}, the value ofthe environment variable @env{COLUMNS}, or the screen width, in that order.@item insert-completions (M-*)Insert all completions of the text before point that would havebeen generated by @code{possible-completions}.@item menu-complete ()Similar to @code{complete}, but replaces the word to be completedwith a single match from the list of possible completions.Repeated execution of @code{menu-complete} steps through the listof possible completions, inserting each match in turn.At the end of the list of completions, the bell is rung(subject to the setting of @code{bell-style})and the original text is restored.An argument of @var{n} moves @var{n} positions forward in the listof matches; a negative argument may be used to move backwardthrough the list.This command is intended to be bound to @key{TAB}, but is unboundby default.@item menu-complete-backward ()Identical to @code{menu-complete}, but moves backward through the listof possible completions, as if @code{menu-complete} had been given anegative argument.@item delete-char-or-list ()Deletes the character under the cursor if not at the beginning orend of the line (like @code{delete-char}).If at the end of the line, behaves identically to@code{possible-completions}.This command is unbound by default.@ifset BashFeatures@item complete-filename (M-/)Attempt filename completion on the text before point.@item possible-filename-completions (C-x /)List the possible completions of the text before point,treating it as a filename.@item complete-username (M-~)Attempt completion on the text before point, treatingit as a username.@item possible-username-completions (C-x ~)List the possible completions of the text before point,treating it as a username.@item complete-variable (M-$)Attempt completion on the text before point, treatingit as a shell variable.@item possible-variable-completions (C-x $)List the possible completions of the text before point,treating it as a shell variable.@item complete-hostname (M-@@)Attempt completion on the text before point, treatingit as a hostname.@item possible-hostname-completions (C-x @@)List the possible completions of the text before point,treating it as a hostname.@item complete-command (M-!)Attempt completion on the text before point, treatingit as a command name. Command completion attempts tomatch the text against aliases, reserved words, shellfunctions, shell builtins, and finally executable filenames,in that order.@item possible-command-completions (C-x !)List the possible completions of the text before point,treating it as a command name.@item dynamic-complete-history (M-@key{TAB})Attempt completion on the text before point, comparingthe text against lines from the history list for possiblecompletion matches.@item dabbrev-expand ()Attempt menu completion on the text before point, comparingthe text against lines from the history list for possiblecompletion matches.@item complete-into-braces (M-@{)Perform filename completion and insert the list of possible completionsenclosed within braces so the list is available to the shell(@pxref{Brace Expansion}).@end ifset@end ftable@node Keyboard Macros@subsection Keyboard Macros@ftable @code@item start-kbd-macro (C-x ()Begin saving the characters typed into the current keyboard macro.@item end-kbd-macro (C-x ))Stop saving the characters typed into the current keyboard macroand save the definition.@item call-last-kbd-macro (C-x e)Re-execute the last keyboard macro defined, by making the charactersin the macro appear as if typed at the keyboard.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -