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

📄 rluserman.html

📁 在非GUI环境下
💻 HTML
📖 第 1 页 / 共 5 页
字号:
If set to <SAMP>`on'</SAMP>, tilde expansion is performed when Readlineattempts word completion.  The default is <SAMP>`off'</SAMP>.<P><A NAME="IDX13"></A>If set to <SAMP>`on'</SAMP>, the history code attempts to place point at thesame location on each history line retrieved with <CODE>previous-history</CODE>or <CODE>next-history</CODE>.</P><P><DT><CODE>horizontal-scroll-mode</CODE><DD><A NAME="IDX14"></A>This variable can be set to either <SAMP>`on'</SAMP> or <SAMP>`off'</SAMP>.  Setting itto <SAMP>`on'</SAMP> 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'</SAMP>.<P><DT><CODE>input-meta</CODE><DD><A NAME="IDX15"></A><A NAME="IDX16"></A>If set to <SAMP>`on'</SAMP>, 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'</SAMP>.  The name <CODE>meta-flag</CODE> is asynonym for this variable.<P><DT><CODE>isearch-terminators</CODE><DD><A NAME="IDX17"></A>The string of characters that should terminate an incremental search withoutsubsequently executing the character as a command (see section <A HREF="rluserman.html#SEC8">1.2.5 Searching for Commands in the History</A>).If this variable has not been given a value, the characters <KBD>ESC</KBD> and<KBD>C-J</KBD> will terminate an incremental search.<P><DT><CODE>keymap</CODE><DD><A NAME="IDX18"></A>Sets Readline's idea of the current keymap for key binding commands.Acceptable <CODE>keymap</CODE> names are<CODE>emacs</CODE>,<CODE>emacs-standard</CODE>,<CODE>emacs-meta</CODE>,<CODE>emacs-ctlx</CODE>,<CODE>vi</CODE>,<CODE>vi-move</CODE>,<CODE>vi-command</CODE>, and<CODE>vi-insert</CODE>.<CODE>vi</CODE> is equivalent to <CODE>vi-command</CODE>; <CODE>emacs</CODE> isequivalent to <CODE>emacs-standard</CODE>.  The default value is <CODE>emacs</CODE>.The value of the <CODE>editing-mode</CODE> variable also affects thedefault keymap.<P><DT><CODE>mark-directories</CODE><DD>If set to <SAMP>`on'</SAMP>, completed directory names have a slashappended.  The default is <SAMP>`on'</SAMP>.<P><DT><CODE>mark-modified-lines</CODE><DD><A NAME="IDX19"></A>This variable, when set to <SAMP>`on'</SAMP>, causes Readline to display anasterisk (<SAMP>`*'</SAMP>) at the start of history lines which have been modified.This variable is <SAMP>`off'</SAMP> by default.<P><DT><CODE>mark-symlinked-directories</CODE><DD><A NAME="IDX20"></A>If set to <SAMP>`on'</SAMP>, completed names which are symbolic linksto directories have a slash appended (subject to the value of<CODE>mark-directories</CODE>).The default is <SAMP>`off'</SAMP>.<P><DT><CODE>match-hidden-files</CODE><DD><A NAME="IDX21"></A>This variable, when set to <SAMP>`on'</SAMP>, causes Readline to match files whosenames begin with a <SAMP>`.'</SAMP> (hidden files) when performing filenamecompletion, unless the leading <SAMP>`.'</SAMP> issupplied by the user in the filename to be completed.This variable is <SAMP>`on'</SAMP> by default.<P><DT><CODE>output-meta</CODE><DD><A NAME="IDX22"></A>If set to <SAMP>`on'</SAMP>, Readline will display characters with theeighth bit set directly rather than as a meta-prefixed escapesequence.  The default is <SAMP>`off'</SAMP>.<P><DT><CODE>page-completions</CODE><DD><A NAME="IDX23"></A>If set to <SAMP>`on'</SAMP>, Readline uses an internal <CODE>more</CODE>-like pagerto display a screenful of possible completions at a time.This variable is <SAMP>`on'</SAMP> by default.<P><DT><CODE>print-completions-horizontally</CODE><DD>If set to <SAMP>`on'</SAMP>, Readline will display completions with matchessorted horizontally in alphabetical order, rather than down the screen.The default is <SAMP>`off'</SAMP>.<P><DT><CODE>show-all-if-ambiguous</CODE><DD><A NAME="IDX24"></A>This alters the default behavior of the completion functions.  Ifset to <SAMP>`on'</SAMP>, 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'</SAMP>.<P><DT><CODE>show-all-if-unmodified</CODE><DD><A NAME="IDX25"></A>This alters the default behavior of the completion functions ina fashion similar to <VAR>show-all-if-ambiguous</VAR>.If set to <SAMP>`on'</SAMP>, 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'</SAMP>.<P><DT><CODE>visible-stats</CODE><DD><A NAME="IDX26"></A>If set to <SAMP>`on'</SAMP>, a character denoting a file's typeis appended to the filename when listing possiblecompletions.  The default is <SAMP>`off'</SAMP>.<P></DL><P><DT>Key Bindings<DD>The 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.<P>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.  The name of the keycan be expressed in different ways, depending on what you find mostcomfortable.</P><P>In addition to command names, readline allows keys to be boundto a string that is inserted when the key is pressed (a <VAR>macro</VAR>).</P><P><DL COMPACT><DT><VAR>keyname</VAR>: <VAR>function-name</VAR> or <VAR>macro</VAR><DD><VAR>keyname</VAR> is the name of a key spelled out in English.  For example:<TABLE><tr><td>&nbsp;</td><td class=example><pre>Control-u: universal-argumentMeta-Rubout: backward-kill-wordControl-o: "&#62; output"</pre></td></tr></table><P>In the above example, <KBD>C-u</KBD> is bound to the function<CODE>universal-argument</CODE>,<KBD>M-DEL</KBD> is bound to the function <CODE>backward-kill-word</CODE>, and<KBD>C-o</KBD> is bound to run the macroexpressed on the right hand side (that is, to insert the text<SAMP>`&#62; output'</SAMP> into the line).</P><P>A number of symbolic character names are recognized whileprocessing this key binding syntax:<VAR>DEL</VAR>,<VAR>ESC</VAR>,<VAR>ESCAPE</VAR>,<VAR>LFD</VAR>,<VAR>NEWLINE</VAR>,<VAR>RET</VAR>,<VAR>RETURN</VAR>,<VAR>RUBOUT</VAR>,<VAR>SPACE</VAR>,<VAR>SPC</VAR>,and<VAR>TAB</VAR>.</P><P><DT>"<VAR>keyseq</VAR>": <VAR>function-name</VAR> or <VAR>macro</VAR><DD><VAR>keyseq</VAR> differs from <VAR>keyname</VAR> above in that stringsdenoting an entire key sequence can be specified, by placingthe key sequence in double quotes.  Some GNU Emacs style keyescapes can be used, as in the following example, but thespecial character names are not recognized.<P><TABLE><tr><td>&nbsp;</td><td class=example><pre>"\C-u": universal-argument"\C-x\C-r": re-read-init-file"\e[11~": "Function Key 1"</pre></td></tr></table></P><P>In the above example, <KBD>C-u</KBD> is again bound to the function<CODE>universal-argument</CODE> (just as it was in the first example),<SAMP>`<KBD>C-x</KBD> <KBD>C-r</KBD>'</SAMP> is bound to the function <CODE>re-read-init-file</CODE>,and <SAMP>`<KBD>ESC</KBD> <KBD>[</KBD> <KBD>1</KBD> <KBD>1</KBD> <KBD>~</KBD>'</SAMP> is bound to insertthe text <SAMP>`Function Key 1'</SAMP>.</P><P></DL><P>The following GNU Emacs style escape sequences are available whenspecifying key sequences:</P><P><DL COMPACT><DT><CODE><KBD>\C-</KBD></CODE><DD>control prefix<DT><CODE><KBD>\M-</KBD></CODE><DD>meta prefix<DT><CODE><KBD>\e</KBD></CODE><DD>an escape character<DT><CODE><KBD>\\</KBD></CODE><DD>backslash<DT><CODE><KBD>\"</KBD></CODE><DD><KBD>"</KBD>, a double quotation mark<DT><CODE><KBD>\'</KBD></CODE><DD><KBD>'</KBD>, a single quote or apostrophe</DL><P>In addition to the GNU Emacs style escape sequences, a secondset of backslash escapes is available:</P><P><DL COMPACT><DT><CODE>\a</CODE><DD>alert (bell)<DT><CODE>\b</CODE><DD>backspace<DT><CODE>\d</CODE><DD>delete<DT><CODE>\f</CODE><DD>form feed<DT><CODE>\n</CODE><DD>newline<DT><CODE>\r</CODE><DD>carriage return<DT><CODE>\t</CODE><DD>horizontal tab<DT><CODE>\v</CODE><DD>vertical tab<DT><CODE>\<VAR>nnn</VAR></CODE><DD>the eight-bit character whose value is the octal value <VAR>nnn</VAR>(one to three digits)<DT><CODE>\x<VAR>HH</VAR></CODE><DD>the eight-bit character whose value is the hexadecimal value <VAR>HH</VAR>(one or two hex digits)</DL><P>When entering the text of a macro, single or double quotes mustbe used to indicate a macro definition.Unquoted text is assumed to be a function name.In the macro body, the backslash escapes described above are expanded.Backslash will quote any other character in the macro text,including <SAMP>`"'</SAMP> and <SAMP>`''</SAMP>.For example, the following binding will make <SAMP>`<KBD>C-x</KBD> \'</SAMP>insert a single <SAMP>`\'</SAMP> into the line:<TABLE><tr><td>&nbsp;</td><td class=example><pre>"\C-x\\": "\\"</pre></td></tr></table></P><P></DL><P><A NAME="Conditional Init Constructs"></A><HR SIZE="6"><A NAME="SEC11"></A><TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0><TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC10"> &lt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC12"> &gt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC12"> &lt;&lt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC9"> Up </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC13"> &gt;&gt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC_Top">Top</A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC_Contents">Contents</A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC_About"> ? </A>]</TD></TR></TABLE><H3> 1.3.2 Conditional Init Constructs </H3><!--docid::SEC11::--><P>Readline implements a facility similar in spirit to the conditionalcompilation features of the C preprocessor which allows keybindings and variable settings to be performed as the resultof tests.  There are four parser directives used.</P><P><DL COMPACT><DT><CODE>$if</CODE><DD>The <CODE>$if</CODE> construct allows bindings to be made based on theediting mode, the terminal being used, or the application usingReadline.  The text of the test extends to the end of the line;no characters are required to isolate it.<P><DL COMPACT><DT><CODE>mode</CODE><DD>The <CODE>mode=</CODE> form of the <CODE>$if</CODE> directive is used to testwhether Readline is in <CODE>emacs</CODE> or <CODE>vi</CODE> mode.This may be used in conjunctionwith the <SAMP>`set keymap'</SAMP> command, for instance, to set bindings inthe <CODE>emacs-standard</CODE> and <CODE>emacs-ctlx</CODE> keymaps only ifReadline is starting out in <CODE>emacs</CODE> mode.<P><DT><CODE>term</CODE><DD>The <CODE>term=</CODE> form may be used to include terminal-specific

⌨️ 快捷键说明

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