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

📄 rluser.texi

📁 android-w.song.android.widget
💻 TEXI
📖 第 1 页 / 共 5 页
字号:
* Conditional Init Constructs::	Conditional key bindings in the inputrc file.* Sample Init File::		An example inputrc file.@end menu@node Readline Init File Syntax@subsection Readline Init File SyntaxThere are only a few basic constructs allowed in theReadline init file.  Blank lines are ignored.Lines beginning with a @samp{#} are comments.Lines beginning with a @samp{$} indicate conditionalconstructs (@pxref{Conditional Init Constructs}).  Other linesdenote variable settings and key bindings.@table @asis@item Variable SettingsYou can modify the run-time behavior of Readline byaltering the values of variables in Readlineusing the @code{set} command within the init file.The syntax is simple:@exampleset @var{variable} @var{value}@end example@noindentHere, for example, is how tochange from the default Emacs-like key binding to use@code{vi} line editing commands:@exampleset editing-mode vi@end exampleVariable names and values, where appropriate, are recognized without regardto case.  Unrecognized variable names are ignored.Boolean variables (those that can be set to on or off) are set to on ifthe value is null or empty, @var{on} (case-insensitive), or 1.  Any othervalue results in the variable being set to off.@ifset BashFeaturesThe @w{@code{bind -V}} command lists the current Readline variable namesand values.  @xref{Bash Builtins}.@end ifsetA great deal of run-time behavior is changeable with the followingvariables.@cindex variables, readline@table @code@item bell-style@vindex bell-styleControls what happens when Readline wants to ring the terminal bell.If set to @samp{none}, Readline never rings the bell.  If set to@samp{visible}, Readline uses a visible bell if one is available.If set to @samp{audible} (the default), Readline attempts to ringthe terminal's bell.@item bind-tty-special-chars@vindex bind-tty-special-charsIf set to @samp{on}, Readline attempts to bind the control characters  treated specially by the kernel's terminal driver to their Readlineequivalents.@item comment-begin@vindex comment-beginThe string to insert at the beginning of the line when the@code{insert-comment} command is executed.  The default valueis @code{"#"}.@item completion-display-width@vindex completion-display-widthThe number of screen columns used to display possible matcheswhen performing completion.The value is ignored if it is less than 0 or greater than the terminalscreen width.A value of 0 will cause matches to be displayed one per line.The default value is -1.@item completion-ignore-case@vindex completion-ignore-caseIf set to @samp{on}, Readline performs filename matching and completionin a case-insensitive fashion.The default value is @samp{off}.@item completion-map-case@vindex completion-map-caseIf set to @samp{on}, and @var{completion-ignore-case} is enabled, Readlinetreats hyphens (@samp{-}) and underscores (@samp{_}) as equivalent whenperforming case-insensitive filename matching and completion.@item completion-prefix-display-length@vindex completion-prefix-display-lengthThe length in characters of the common prefix of a list of possiblecompletions that is displayed without modification.  When set to avalue greater than zero, common prefixes longer than this value arereplaced with an ellipsis when displaying possible completions.@item completion-query-items@vindex completion-query-itemsThe number of possible completions that determines when the user isasked whether the list of possibilities should be displayed.If the number of possible completions is greater than this value,Readline will ask the user whether or not he wishes to viewthem; otherwise, they are simply listed.This variable must be set to an integer value greater than or equal to 0.A negative value means Readline should never ask.The default limit is @code{100}.@item convert-meta@vindex convert-metaIf set to @samp{on}, Readline will convert characters with theeighth bit set to an @sc{ascii} key sequence by stripping the eighthbit and prefixing an @key{ESC} character, converting them to ameta-prefixed key sequence.  The default value is @samp{on}.@item disable-completion@vindex disable-completionIf set to @samp{On}, Readline will inhibit word completion.Completion  characters will be inserted into the line as if they hadbeen mapped to @code{self-insert}.  The default is @samp{off}.@item editing-mode@vindex editing-modeThe @code{editing-mode} variable controls which default set ofkey bindings is used.  By default, Readline starts up in Emacs editingmode, where the keystrokes are most similar to Emacs.  This variable can beset to either @samp{emacs} or @samp{vi}.@item echo-control-charactersWhen set to @samp{on}, on operating systems that indicate they support it,readline echoes a character corresponding to a signal generated from thekeyboard.  The default is @samp{on}.@item enable-keypad@vindex enable-keypadWhen set to @samp{on}, Readline will try to enable the applicationkeypad when it is called.  Some systems need this to enable thearrow keys.  The default is @samp{off}.@item enable-meta-keyWhen set to @samp{on}, Readline will try to enable any meta modifierkey the terminal claims to support when it is called.  On many terminals,the meta key is used to send eight-bit characters.The default is @samp{on}.@item expand-tilde@vindex expand-tildeIf set to @samp{on}, tilde expansion is performed when Readlineattempts word completion.  The default is @samp{off}.@item history-preserve-point@vindex history-preserve-pointIf set to @samp{on}, the history code attempts to place the point (thecurrent cursor position) at thesame location on each history line retrieved with @code{previous-history}or @code{next-history}.  The default is @samp{off}.@item history-size@vindex history-sizeSet the maximum number of history entries saved in the history list.  Ifset to zero, the number of entries in the history list is not limited.@item horizontal-scroll-mode@vindex horizontal-scroll-modeThis variable can be set to either @samp{on} or @samp{off}.  Setting itto @samp{on} means that the text of the lines being edited will scrollhorizontally on a single screen line when they are longer than the widthof the screen, instead of wrapping onto a new screen line.  By default,this variable is set to @samp{off}.@item input-meta@vindex input-meta@vindex meta-flagIf set to @samp{on}, Readline will enable eight-bit input (itwill not clear the eighth bit in the characters it reads),regardless of what the terminal claims it can support.  Thedefault value is @samp{off}.  The name @code{meta-flag} is asynonym for this variable.@item isearch-terminators@vindex isearch-terminatorsThe string of characters that should terminate an incremental search withoutsubsequently executing the character as a command (@pxref{Searching}).If this variable has not been given a value, the characters @key{ESC} and@kbd{C-J} will terminate an incremental search.@item keymap@vindex keymapSets Readline's idea of the current keymap for key binding commands.Acceptable @code{keymap} names are@code{emacs},@code{emacs-standard},@code{emacs-meta},@code{emacs-ctlx},@code{vi},@code{vi-move},@code{vi-command}, and@code{vi-insert}.@code{vi} is equivalent to @code{vi-command}; @code{emacs} isequivalent to @code{emacs-standard}.  The default value is @code{emacs}.The value of the @code{editing-mode} variable also affects thedefault keymap.@item mark-directoriesIf set to @samp{on}, completed directory names have a slashappended.  The default is @samp{on}.@item mark-modified-lines@vindex mark-modified-linesThis variable, when set to @samp{on}, causes Readline to display anasterisk (@samp{*}) at the start of history lines which have been modified.This variable is @samp{off} by default.@item mark-symlinked-directories@vindex mark-symlinked-directoriesIf set to @samp{on}, completed names which are symbolic linksto directories have a slash appended (subject to the value of@code{mark-directories}).The default is @samp{off}.@item match-hidden-files@vindex match-hidden-filesThis variable, when set to @samp{on}, causes Readline to match files whosenames begin with a @samp{.} (hidden files) when performing filenamecompletion.If set to @samp{off}, the leading @samp{.} must besupplied by the user in the filename to be completed.This variable is @samp{on} by default.@item menu-complete-display-prefix@vindex menu-complete-display-prefixIf set to @samp{on}, menu completion displays the common prefix of thelist of possible completions (which may be empty) before cycling throughthe list.  The default is @samp{off}.@item output-meta@vindex output-metaIf set to @samp{on}, Readline will display characters with theeighth bit set directly rather than as a meta-prefixed escapesequence.  The default is @samp{off}.@item page-completions@vindex page-completionsIf set to @samp{on}, Readline uses an internal @code{more}-like pagerto display a screenful of possible completions at a time.This variable is @samp{on} by default.@item print-completions-horizontallyIf set to @samp{on}, Readline will display completions with matchessorted horizontally in alphabetical order, rather than down the screen.The default is @samp{off}.@item revert-all-at-newline@vindex revert-all-at-newlineIf set to @samp{on}, Readline will undo all changes to history linesbefore returning when @code{accept-line} is executed.  By default,history lines may be modified and retain individual undo lists acrosscalls to @code{readline}.  The default is @samp{off}.@item show-all-if-ambiguous@vindex show-all-if-ambiguousThis alters the default behavior of the completion functions.  Ifset to @samp{on}, words which have more than one possible completion cause thematches to be listed immediately instead of ringing the bell.The default value is @samp{off}.@item show-all-if-unmodified@vindex show-all-if-unmodifiedThis alters the default behavior of the completion functions ina fashion similar to @var{show-all-if-ambiguous}.If set to @samp{on}, words which have more than one possible completion without anypossible partial completion (the possible completions don't sharea common prefix) cause the matches to be listed immediately insteadof ringing the bell.The default value is @samp{off}.@item skip-completed-text@vindex skip-completed-textIf set to @samp{on}, this alters the default completion behavior wheninserting a single match into the line.  It's only active whenperforming completion in the middle of a word.  If enabled, readlinedoes not insert characters from the completion that match charactersafter point in the word being completed, so portions of the wordfollowing the cursor are not duplicated.For instance, if this is enabled, attempting completion when the cursoris after the @samp{e} in @samp{Makefile} will result in @samp{Makefile}rather than @samp{Makefilefile}, assuming there is a single possiblecompletion.The default value is @samp{off}.@item visible-stats@vindex visible-statsIf set to @samp{on}, a character denoting a file's typeis appended to the filename when listing possiblecompletions.  The default is @samp{off}.@end table@item Key BindingsThe syntax for controlling key bindings in the init file issimple.  First you need to find the name of the command that youwant to change.  The following sections contain tables of the commandname, the default keybinding, if any, and a short description of whatthe command does.Once you know the name of the command, simply place on a linein the init file the name of the keyyou wish to bind the command to, a colon, and then the name of thecommand.There can be no space between the key name and the colon -- that will beinterpreted as part of the key name.The name of the key can be expressed in different ways, depending onwhat you find most comfortable.In addition to command names, readline allows keys to be boundto a string that is inserted when the key is pressed (a @var{macro}).@ifset BashFeaturesThe @w{@code{bind -p}} command displays Readline function names andbindings in a format that can put directly into an initialization file.@xref{Bash Builtins}.@end ifset@table @asis@item @w{@var{keyname}: @var{function-name} or @var{macro}}@var{keyname} is the name of a key spelled out in English.  For example:@exampleControl-u: universal-argumentMeta-Rubout: backward-kill-wordControl-o: "> output"@end exampleIn the above example, @kbd{C-u} is bound to the function@code{universal-argument},@kbd{M-DEL} is bound to the function @code{backward-kill-word}, and@kbd{C-o} is bound to run the macroexpressed on the right hand side (that is, to insert the text@samp{> output} into the line).A number of symbolic character names are recognized whileprocessing this key binding syntax:@var{DEL},@var{ESC},@var{ESCAPE},@var{LFD},@var{NEWLINE},@var{RET},@var{RETURN},@var{RUBOUT},@var{SPACE},@var{SPC},and

⌨️ 快捷键说明

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