📄 rluserman.html
字号:
<TABLE><tr><td> </td><td class=example><pre>$if Bash# Quote the current or previous word"\C-xq": "\eb\"\ef\""$endif</pre></td></tr></table></DL><P><DT><CODE>$endif</CODE><DD>This command, as seen in the previous example, terminates an<CODE>$if</CODE> command.<P><DT><CODE>$else</CODE><DD>Commands in this branch of the <CODE>$if</CODE> directive are executed ifthe test fails.<P><DT><CODE>$include</CODE><DD>This directive takes a single filename as an argument and reads commandsand bindings from that file.For example, the following directive reads from <TT>`/etc/inputrc'</TT>:<TABLE><tr><td> </td><td class=example><pre>$include /etc/inputrc</pre></td></tr></table></DL><P><A NAME="Sample Init File"></A><HR SIZE="6"><A NAME="SEC12"></A><TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0><TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC11"> < </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC13"> > </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC13"> << </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"> >> </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <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.3 Sample Init File </H3><!--docid::SEC12::--><P>Here is an example of an <VAR>inputrc</VAR> file. This illustrates keybinding, variable assignment, and conditional syntax.</P><P><TABLE><tr><td> </td><td class=example><pre># This file controls the behaviour of line input editing for# programs that use the GNU Readline library. Existing# programs include FTP, Bash, and GDB.## You can re-read the inputrc file with C-x C-r.# Lines beginning with '#' are comments.## First, include any systemwide bindings and variable# assignments from /etc/Inputrc$include /etc/Inputrc## Set various bindings for emacs mode.set editing-mode emacs $if mode=emacsMeta-Control-h: backward-kill-word Text after the function name is ignored## Arrow keys in keypad mode##"\M-OD": backward-char#"\M-OC": forward-char#"\M-OA": previous-history#"\M-OB": next-history## Arrow keys in ANSI mode#"\M-[D": backward-char"\M-[C": forward-char"\M-[A": previous-history"\M-[B": next-history## Arrow keys in 8 bit keypad mode##"\M-\C-OD": backward-char#"\M-\C-OC": forward-char#"\M-\C-OA": previous-history#"\M-\C-OB": next-history## Arrow keys in 8 bit ANSI mode##"\M-\C-[D": backward-char#"\M-\C-[C": forward-char#"\M-\C-[A": previous-history#"\M-\C-[B": next-historyC-q: quoted-insert$endif# An old-style binding. This happens to be the default.TAB: complete# Macros that are convenient for shell interaction$if Bash# edit the path"\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"# prepare to type a quoted word --# insert open and close double quotes# and move to just after the open quote"\C-x\"": "\"\"\C-b"# insert a backslash (testing backslash escapes# in sequences and macros)"\C-x\\": "\\"# Quote the current or previous word"\C-xq": "\eb\"\ef\""# Add a binding to refresh the line, which is unbound"\C-xr": redraw-current-line# Edit variable on current line."\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y="$endif# use a visible bell if one is availableset bell-style visible# don't strip characters to 7 bits when readingset input-meta on# allow iso-latin1 characters to be inserted rather# than converted to prefix-meta sequencesset convert-meta off# display characters with the eighth bit set directly# rather than as meta-prefixed charactersset output-meta on# if there are more than 150 possible completions for# a word, ask the user if he wants to see all of themset completion-query-items 150# For FTP$if Ftp"\C-xg": "get \M-?""\C-xt": "put \M-?""\M-.": yank-last-arg$endif</pre></td></tr></table></P><P><A NAME="Bindable Readline Commands"></A><HR SIZE="6"><A NAME="SEC13"></A><TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0><TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC12"> < </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC14"> > </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC22"> << </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC1"> Up </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC22"> >> </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <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><H2> 1.4 Bindable Readline Commands </H2><!--docid::SEC13::--><P><BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0> <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="rluserman.html#SEC14">1.4.1 Commands For Moving</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Moving about the line.</TD></TR><TR><TD ALIGN="left" VALIGN="TOP"><A HREF="rluserman.html#SEC15">1.4.2 Commands For Manipulating The History</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Getting at previous lines.</TD></TR><TR><TD ALIGN="left" VALIGN="TOP"><A HREF="rluserman.html#SEC16">1.4.3 Commands For Changing Text</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Commands for changing text.</TD></TR><TR><TD ALIGN="left" VALIGN="TOP"><A HREF="rluserman.html#SEC17">1.4.4 Killing And Yanking</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Commands for killing and yanking.</TD></TR><TR><TD ALIGN="left" VALIGN="TOP"><A HREF="rluserman.html#SEC18">1.4.5 Specifying Numeric Arguments</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Specifying numeric arguments, repeat counts.</TD></TR><TR><TD ALIGN="left" VALIGN="TOP"><A HREF="rluserman.html#SEC19">1.4.6 Letting Readline Type For You</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Getting Readline to do the typing for you.</TD></TR><TR><TD ALIGN="left" VALIGN="TOP"><A HREF="rluserman.html#SEC20">1.4.7 Keyboard Macros</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Saving and re-executing typed characters</TD></TR><TR><TD ALIGN="left" VALIGN="TOP"><A HREF="rluserman.html#SEC21">1.4.8 Some Miscellaneous Commands</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Other miscellaneous commands.</TD></TR></TABLE></BLOCKQUOTE><P>This section describes Readline commands that may be bound to keysequences.Command names without an accompanying key sequence are unbound by default.</P><P>In the following descriptions, <EM>point</EM> refers to the current cursorposition, and <EM>mark</EM> refers to a cursor position saved by the<CODE>set-mark</CODE> command.The text between the point and mark is referred to as the <EM>region</EM>.</P><P><A NAME="Commands For Moving"></A><HR SIZE="6"><A NAME="SEC14"></A><TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0><TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC13"> < </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC15"> > </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC22"> << </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC13"> Up </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC22"> >> </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <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.4.1 Commands For Moving </H3><!--docid::SEC14::--><DL COMPACT><A NAME="IDX26"></A><DT><CODE>beginning-of-line (C-a)</CODE><DD><A NAME="IDX27"></A>Move to the start of the current line.<P><A NAME="IDX28"></A><DT><CODE>end-of-line (C-e)</CODE><DD><A NAME="IDX29"></A>Move to the end of the line.<P><A NAME="IDX30"></A><DT><CODE>forward-char (C-f)</CODE><DD><A NAME="IDX31"></A>Move forward a character.<P><A NAME="IDX32"></A><DT><CODE>backward-char (C-b)</CODE><DD><A NAME="IDX33"></A>Move back a character.<P><A NAME="IDX34"></A><DT><CODE>forward-word (M-f)</CODE><DD><A NAME="IDX35"></A>Move forward to the end of the next word. Words are composed ofletters and digits.<P><A NAME="IDX36"></A><DT><CODE>backward-word (M-b)</CODE><DD><A NAME="IDX37"></A>Move back to the start of the current or previous word. Words arecomposed of letters and digits.<P><A NAME="IDX38"></A><DT><CODE>clear-screen (C-l)</CODE><DD><A NAME="IDX39"></A>Clear the screen and redraw the current line,leaving the current line at the top of the screen.<P><A NAME="IDX40"></A><DT><CODE>redraw-current-line ()</CODE><DD><A NAME="IDX41"></A>Refresh the current line. By default, this is unbound.<P></DL><P><A NAME="Commands For History"></A><HR SIZE="6"><A NAME="SEC15"></A><TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0><TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC14"> < </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC16"> > </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC16"> << </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC13"> Up </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC22"> >> </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <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.4.2 Commands For Manipulating The History </H3><!--docid::SEC15::--><P><DL COMPACT><A NAME="IDX42"></A><DT><CODE>accept-line (Newline or Return)</CODE><DD><A NAME="IDX43"></A>Accept 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()</CODE>.If this line is a modified history line, the history line is restoredto its original state.<P><A NAME="IDX44"></A><DT><CODE>previous-history (C-p)</CODE><DD><A NAME="IDX45"></A>Move `back' through the history list, fetching the previous command.<P><A NAME="IDX46"></A><DT><CODE>next-history (C-n)</CODE><DD><A NAME="IDX47"></A>Move `forward' through the history list, fetching the next command.<P><A NAME="IDX48"></A><DT><CODE>beginning-of-history (M-<)</CODE><DD><A NAME="IDX49"></A>Move to the first line in the history.<P><A NAME="IDX50"></A><DT><CODE>end-of-history (M->)</CODE><DD><A NAME="IDX51"></A>Move to the end of the input history, i.e., the line currentlybeing entered.<P><A NAME="IDX52"></A><DT><CODE>reverse-search-history (C-r)</CODE><DD><A NAME="IDX53"></A>Search backward starting at the current line and moving `up' through
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -