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

📄 rluser.texinfo

📁 linux下bash源码
💻 TEXINFO
📖 第 1 页 / 共 4 页
字号:
@end menuThis section describes Readline commands that may be bound to keysequences.@ifset BashFeaturesYou can list your key bindings by executing@w{@code{bind -P}} or, for a more terse format, suitable for an@var{inputrc} file, @w{@code{bind -p}}.  (@xref{Bash Builtins}.)@end ifsetCommand names without an accompanying key sequence are unbound by default.In the following descriptions, @dfn{point} refers to the current cursorposition, and @dfn{mark} refers to a cursor position saved by the@code{set-mark} command.The text between the point and mark is referred to as the @dfn{region}.@node Commands For Moving@subsection Commands For Moving@ftable @code@item beginning-of-line (C-a)Move to the start of the current line.@item end-of-line (C-e)Move to the end of the line.@item forward-char (C-f)Move forward a character.@item backward-char (C-b)Move back a character.@item forward-word (M-f)Move forward to the end of the next word.  Words are composed ofletters and digits.@item backward-word (M-b)Move back to the start of the current or previous word.  Words arecomposed of letters and digits.@item clear-screen (C-l)Clear the screen and redraw the current line,leaving the current line at the top of the screen.@item redraw-current-line ()Refresh the current line.  By default, this is unbound.@end ftable@node Commands For History@subsection Commands For Manipulating The History@ftable @code@item accept-line (Newline or Return)@ifset BashFeaturesAccept the line regardless of where the cursor is.If this line isnon-empty, add it to the history list according to the setting ofthe @env{HISTCONTROL} and @env{HISTIGNORE} variables.If this line is a modified history line, then restore the history lineto its original state.@end ifset@ifclear BashFeaturesAccept the line regardless of where the cursor is.If this line isnon-empty, it may be added to the history list for future recall with@code{add_history()}.If this line is a modified history line, the history line is restoredto its original state.@end ifclear@item previous-history (C-p)Move `back' through the history list, fetching the previous command.@item next-history (C-n)Move `forward' through the history list, fetching the next command.@item beginning-of-history (M-<)Move to the first line in the history.@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.@item yank-last-arg (M-. or M-_)Insert last argument to the previous command (the last word of theprevious history entry).  With anargument, behave exactly like @code{yank-nth-arg}.Successive calls to @code{yank-last-arg} move back through the historylist, inserting the last argument of each line in turn.@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.@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.@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}.@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 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.@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 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 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.@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-@@)

⌨️ 快捷键说明

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