📄 readline_3.ps
字号:
(mands are similar to those of emacs.)108 288 Q 2.5(Av)5 G(i\255style line editing interf)-2.5 E(ace is also a)-.1 E -.25(va)-.2 G(ilable.).25 E .272(This manual page describes only the most basic use of)108 304.8 R F2-.18(re)2.772 G(adline).18 E F0 5.272(.M)C .272(uch more functionality is a)-5.272 F -.25(va)-.2 G .272(ilable; see).25F F3(The GNU Readline Libr)108 316.8 Q(ary)-.15 E F0(and)2.5 E F3(The GNU History Libr)2.5 E(ary)-.15 E F0(for additional information.)2.5 E F1(RETURN V)72 333.6 Q(ALUE)-1.478 E F2 -.18(re)108 345.6 S(adline).18 E F0 1.09(returns the te)3.59 F 1.09(xt of the line read.)-.15 F 3.589(Ab)6.09 G 1.089(lank line returns the empty string.)-3.589F(If)6.089 E F2(EOF)3.589 E F0 1.089(is encountered)3.589 F .283(while reading a line, and the line is empty)108 357.6 R(,)-.65 E F2(NULL)2.783 E F0 .283(is returned.)2.783 F .283(If an)5.283 F F2(EOF)2.783 E F0 .283(is read with a non\255empty line, it)2.783 F(is treated as a ne)108 369.6 Q(wline.)-.25 E F1(NO)72 386.4 Q -.986(TA)-.438 G(TION)-.054 E F0 .181(An emacs-style notation is used to denote k)108 398.4 R -.15(ey)-.1 G(strok).15 E 2.681(es. Control)-.1 F -.1(ke)2.681 G .18(ys are denoted by C\255)-.05 F F3 -.1(ke)C(y)-.2 E F0 2.68(,e)C .18(.g., C\255n means)-2.68 F 2.625(Control\255N. Similarly)108 410.4 R(,)-.65 E F3(meta)2.625 E F0 -.1(ke)2.625 G .125(ys are denoted by M\255)-.05 F F3 -.1(ke)C(y)-.2 E F0 2.625(,s)C 2.625(oM)-2.625 G .125(\255x means Meta\255X.)-2.625 F .126(\(On k)5.126 F -.15(ey)-.1 G .126(boards without a).15 F F3(meta)108 422.4 Q F0 -.1(ke)3.309 G 2.109 -.65(y, M)-.05 H<ad>.65 E F3(x)A F0 .809(means ESC)3.309 F F3(x)3.309 E F03.309(,i)C .809(.e., press the Escape k)-3.309 F 1.108 -.15(ey t)-.1 H.808(hen the).15 F F3(x)3.308 E F0 -.1(ke)3.308 G 4.608 -.65(y. T)-.05 H.808(his mak).65 F .808(es ESC the)-.1 F F3 .808(meta pr)3.308 F(e\214x)-.37 E F0(.)A .48(The combination M\255C\255)108 434.4 R F3(x)A F0 .48(means ESC\255Control\255)2.98 F F3(x)A F0 2.98(,o)C 2.98(rp)-2.98 G .48(ress the Escape k)-2.98 F .78 -.15(ey t)-.1 H .48(hen hold the Control k).15 F .78 -.15(ey w)-.1 H(hile).15 E(pressing the)108 446.4 Q F3(x)2.5 E F0 -.1(ke)2.5 G -.65(y.)-.05 G(\)).65 E .62(Readline commands may be gi)108 463.2 R -.15(ve)-.25 G 3.119(nn).15 G(umeric)-3.119 E F3(ar)3.119 E(guments)-.37 E F0 3.119(,w).27 G.619(hich normally act as a repeat count.)-3.119 F(Sometimes,)5.619 E(ho)108 475.2 Q(we)-.25 E -.15(ve)-.25 G 1.418 -.4(r, i).15 H 3.118(ti).4 G 3.119(st)-3.118 G .619(he sign of the ar)-3.119 F .619(gument that is signi\214cant.)-.18 F -.15(Pa)5.619 G .619(ssing a ne).15 F -.05(ga)-.15 G(ti).05 E .919 -.15(ve a)-.25 H -.18(rg).15 G .619(ument to a command that).18 F 1.019(acts in the forw)108 487.2 R 1.018(ard direction \(e.g.,)-.1 F F2(kill\255line)3.518 E F0 3.518(\)c)C1.018(auses that command to act in a backw)-3.518 F 1.018(ard direction.)-.1 F(Com-)6.018 E(mands whose beha)108 499.2 Q(vior with ar)-.2 E(guments de)-.18 E(viates from this are noted.)-.25 E.811(When a command is described as)108 516 R F3(killing)3.311 E F0(te)3.311 E .811(xt, the te)-.15 F .811(xt deleted is sa)-.15 F -.15(ve)-.2G 3.311(df).15 G .812(or possible future retrie)-3.311 F -.25(va)-.25 G3.312(l\().25 G F3(yank-)-3.312 E(ing)108 528 Q F0 2.529(\). The)B .029(killed te)2.529 F .029(xt is sa)-.15 F -.15(ve)-.2 G 2.529(di).15 G2.529(na)-2.529 G F3 .029(kill ring)B F0 5.029(.C)C(onsecuti)-5.029 E.329 -.15(ve k)-.25 H .029(ills cause the te).15 F .029(xt to be accumulated into one unit,)-.15 F .567(which can be yank)108540 R .567(ed all at once.)-.1 F .567(Commands which do not kill te)5.567 F .567(xt separate the chunks of te)-.15 F .567(xt on the kill)-.15 F(ring.)108 552 Q F1(INITIALIZA)72 568.8 Q(TION FILE)-1.04 E F0.091(Readline is customized by putting commands in an initialization \\214le \(the)108 580.8 R F3(inputr)2.591 E(c)-.37 E F0 2.591(\214le\). The)2.591 F .091(name of this \214le)2.591 F 1.442(is tak)108592.8 R 1.443(en from the v)-.1 F 1.443(alue of the)-.25 F F2(INPUTRC)3.943 E F0(en)3.943 E 1.443(vironment v)-.4 F 3.943(ariable. If)-.25 F1.443(that v)3.943 F 1.443(ariable is unset, the def)-.25 F 1.443(ault is)-.1 F F3(~/.inputr)108 604.8 Q(c)-.37 E F0 5.359(.W).31 G .359(hen a program which uses the readline library starts up, the init \214\le is read, and the k)-5.359 F .658 -.15(ey b)-.1 H(ind-).15 E 1.083(ings and v)108 616.8 R 1.083(ariables are set.)-.25 F 1.083(There are only a fe)6.083 F 3.583(wb)-.25 G 1.083(asic constructs allo)-3.583 F 1.084(wed in the readline init \214le.)-.25 F(Blank)6.084 E.737(lines are ignored.)108 628.8 R .737(Lines be)5.737 F .737(ginning with a)-.15 F F2(#)3.237 E F0 .737(are comments.)3.237 F .737(Lines be)5.737 F .737(ginning with a)-.15 F F2($)3.237 E F0 .736(indicate conditional)3.236 F 2.614(constructs. Other)108 640.8 R .114(lines denote k)2.614 F .414 -.15(ey b)-.1 H .115(indings and v).15 F.115(ariable settings.)-.25 F .115(Each program using this library may add)5.115 F(its o)108 652.8 Q(wn commands and bindings.)-.25 E -.15(Fo)108 669.6 S 2.5(re).15 G(xample, placing)-2.65 E(M\255Control\255u: uni)144 686.4 Q -.15(ve)-.25G(rsal\255ar).15 E(gument)-.18 E(or)108 698.4 Q(C\255Meta\255u: uni)144710.4 Q -.15(ve)-.25 G(rsal\255ar).15 E(gument)-.18 E(GNU Readline 4.3)72 768 Q(2002 January 22)126.24 E(1)195.95 E EP%%Page: 2 2%%BeginPageSetupBP%%EndPageSetup/F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R(into the)108 84 Q/F1 10/Times-Italic@0 SF(inputr)2.5 E(c)-.37 E F0 -.1(wo)2.5 G(uld mak).1 E 2.5(eM)-.1 G(\255C\255u e)-2.5 E -.15(xe)-.15 G(cute the readline command).15 E F1(univer)2.5 E(sal\255ar)-.1 E(gument)-.37 E F0(.).68 E 2.795(The follo)108 100.8 R 2.795(wing symbolic character names are recognized while processing k)-.25 F3.095 -.15(ey b)-.1 H(indings:).15 E F1(DEL)5.295 E F0(,).53 E F1(ESC)5.295 E F0(,).72 E F1(ESCAPE)108 112.8 Q F0(,).73 E F1(LFD)2.5 E F0(,).28 E F1(NEWLINE)2.5 E F0(,).73 E F1(RET)2.5 E F0(,)1.27 E F1(RETURN)2.5E F0(,)1.1 E F1 -.4(RU)2.5 G(BOUT).4 E F0(,)1.27 E F1(SP)2.5 E -.3(AC)-.9 G(E).3 E F0(,).73 E F1(SPC)2.5 E F0 2.5(,a).72 G(nd)-2.5 E F1 -.5(TA)2.5 G(B).5 E F0(.).27 E .209(In addition to command names, readline allo)108 129.6 R .209(ws k)-.25F -.15(ey)-.1 G 2.709(st).15 G 2.709(ob)-2.709 G 2.709(eb)-2.709 G .209(ound to a string that is inserted when the k)-2.709 F .509 -.15(ey i)-.1 H(s).15 E(pressed \(a)108 141.6 Q F1(macr)2.5 E(o)-.45 E F0(\).)A/F210/Times-Bold@0 SF -.25(Ke)87 163.2 S 2.5(yB).25 G(indings)-2.5 E F0.382(The syntax for controlling k)108 175.2 R .682 -.15(ey b)-.1 H .382(indings in the).15 F F1(inputr)2.882 E(c)-.37 E F0 .382(\214le is simple.)2.882 F .382(All that is required is the name of the)5.382 F .382(command or the te)108 187.2 R .383(xt of a macro and a k)-.15 F .683 -.15(ey s)-.1 H .383(equence to which it should be bound. The name may be speci-).15 F .853(\214ed in one of tw)108 199.2 R 3.353(ow)-.1 G .853(ays: as a symbolic k)-3.453 F 1.153 -.15(ey n)-.1 H .853(ame, possibly with).15 F F1(Meta\255)3.353 E F0(or)3.353 E F1(Contr)3.353 E(ol\255)-.45 E F0(pre\214x)3.353 E .853(es, or as a k)-.15 F -.15(ey)-.1 G(sequence.)108 211.2 Q 1.766(When using the form)108 228 R F2-.1(ke)4.266 G(yname).1 E F0(:)A F1(function-name).833 E F0(or)4.266 EF1(macr)4.267 E(o)-.45 E F0(,)A F1 -.1(ke)4.267 G(yname)-.2 E F0 1.767(is the name of a k)4.267 F 2.067 -.15(ey s)-.1 H 1.767(pelled out in).15 F 2.5(English. F)108 240 R(or e)-.15 E(xample:)-.15 E(Control\255u: uni)144 264 Q -.15(ve)-.25 G(rsal\255ar).15 E(gument)-.18E(Meta\255Rubout: backw)144 276 Q(ard\255kill\255w)-.1 E(ord)-.1 E(Control\255o: "> output")144 288 Q .229(In the abo)108 304.8 R .529-.15(ve ex)-.15 H(ample,).15 E F1(C\255u)2.729 E F0 .229(is bound to the function)2.729 F F2(uni)2.729 E -.1(ve)-.1 G(rsal\255ar).1 E(gument)-.1 E F0(,)A F1(M-DEL)2.729 E F0 .228(is bound to the function)2.729 F F2(backward\255kill\255w)108 316.8 Q(ord)-.1 E F0 3.837(,a)C(nd)-3.837 E F1(C\255o)3.837 E F0 1.337(is bound to run the macro e)3.837 F 1.337(xpressed on the right hand side \(that is, to)-.15 F(insert the te)108328.8 Q(xt)-.15 E/F3 10/Courier@0 SF 6(>o)2.5 G(utput)-6 E F0(into the line\).)2.5 E .056(In the second form,)108 345.6 R F2("k)2.556E(eyseq")-.1 E F0(:)A F1(function\255name).833 E F0(or)2.556 E F1(macr)2.556 E(o)-.45 E F0(,)A F2 -.1(ke)2.556 G(yseq).1 E F0(dif)2.555 E .055(fers from)-.25 F F2 -.1(ke)2.555 G(yname).1 E F0(abo)2.555 E .355 -.15(ve i)-.15 H 2.555(nt).15 G .055(hat strings)-2.555 F 1.284(denoting an entire k)108 357.6 R 1.584 -.15(ey s)-.1 H 1.284(equence m\ay be speci\214ed by placing the sequence within double quotes.).15 F(Some)6.284 E .386(GNU Emacs style k)108 369.6 R .686 -.15(ey e)-.1 H.385(scapes can be used, as in the follo).15 F .385(wing e)-.25 F .385(xample, b)-.15 F .385(ut the symbolic character names)-.2 F(are not recognized.)108 381.6 Q("\\C\255u": uni)144 405.6 Q -.15(ve)-.25 G(rsal\255ar).15 E(gument)-.18 E("\\C\255x\\C\255r": re\255read\255init\255\214le)144 417.6 Q("\\e[11~": "Function K)144 429.6 Q .3 -.15(ey 1)-.25 H(").15 E .237(In this e)108 446.4 R(xample,)-.15 E F1(C-u)2.737 E F0 .237(is ag)2.737F .238(ain bound to the function)-.05 F F2(uni)2.738 E -.1(ve)-.1 G(rsal\255ar).1 E(gument)-.1 E F0(.)A F1 .238(C-x C-r)5.238 F F0 .238(is bound to the function)2.738 F F2 -.18(re)108 458.4 S<ad72>.18 E(ead\255init\255\214le)-.18 E F0 2.5(,a)C(nd)-2.5 E F1(ESC [ 1 1 ~)2.5 EF0(is bound to insert the te)2.5 E(xt)-.15 E F3(Function Key 1)2.5 E F0(.)A(The full set of GNU Emacs style escape sequences a)108 475.2 Q -.25(va)-.2 G(ilable when specifying k).25 E .3 -.15(ey s)-.1 H(equences is).15 E F2<5c43ad>144 487.2 Q F0(control pre\214x)20.3 E F2<5c4dad>144499.2 Q F0(meta pre\214x)18.08 E F2(\\e)144 511.2 Q F0(an escape character)28.78 E F2(\\\\)144 523.2 Q F0(backslash)30.44 E F2(\\")144 535.2 Q F0(literal ", a double quote)27.67 E F2(\\')144 547.2 QF0(literal ', a single quote)29.89 E(In addition to the GNU Emacs style\ escape sequences, a second set of backslash escapes is a)108 564 Q -.25(va)-.2 G(ilable:).25 E F2(\\a)144 576 Q F0(alert \(bell\))28.22 E F2(\\b)144 588 Q F0(backspace)27.66 E F2(\\d)144 600 Q F0(delete)27.66 EF2(\\f)144 612 Q F0(form feed)29.89 E F2(\\n)144 624 Q F0(ne)27.66 E(wline)-.25 E F2(\\r)144 636 Q F0(carriage return)28.78 E F2(\\t)144 648Q F0(horizontal tab)29.89 E F2(\\v)144 660 Q F0 -.15(ve)28.22 G(rtical tab).15 E F2(\\)144 672 Q F1(nnn)A F0(the eight-bit character whose v)18.22 E(alue is the octal v)-.25 E(alue)-.25 E F1(nnn)2.5 E F0(\(one to three digits\))2.5 E F2(\\x)144684 Q F1(HH)A F0(the eight-bit character whose v)13.78 E(alue is the he)-.25 E(xadecimal v)-.15 E(alue)-.25 E F1(HH)2.5 E F0(\(one or tw)2.5 E2.5(oh)-.1 G .3 -.15(ex d)-2.5 H(igits\)).15 E .74(When entering the te)108 700.8 R .74(xt of a macro, single or double quotes should be used t\o indicate a macro de\214nition.)-.15 F .089(Unquoted te)108 712.8 R.089(xt is assumed to be a function name.)-.15 F .09(In the macro body)5.089 F 2.59(,t)-.65 G .09(he backslash escapes described abo)-2.59 F-.15(ve)-.15 G(are e)108 724.8 Q 2.5(xpanded. Backslash)-.15 F(will quote an)2.5 E 2.5(yo)-.15 G(ther character in the macro te)-2.5 E(xt, including " and '.)-.15 E(GNU Readline 4.3)72 768 Q(2002 January 22)126.24 E(2)195.95 E EP%%Page: 3 3%%BeginPageSetupBP%%EndPageSetup/F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R/F1 10/Times-Bold@0 SF(Bash)108 84 Q F0(allo)2.93 E .43(ws the current readline k)-.25 F .73 -.15(ey b)-.1 H .429(indings to be displayed or modi\214ed with the).15 F F1(bind)2.929 E F0-.2(bu)2.929 G .429(iltin command.).2 F 1.095(The editing mode may be switched during interacti)108 96 R 1.395 -.15(ve u)-.25 H 1.095(se by using the).15 F F1<ad6f>3.595 E F0 1.095(option to the)3.595 F F1(set)3.595 E F0 -.2(bu)3.595 G 1.095(iltin com-).2 F 3.097(mand. Other)108 108 R .597(programs using this library pro)3.097 F .597(vide similar mechanisms.)-.15 F(The)5.597 E/F2 10/Times-Italic@0 SF(inputr)3.097 E(c)-.37 E F0.596(\214le may be edited and)3.096 F(re-read if a program does not pro)108 120 Q(vide an)-.15 E 2.5(yo)-.15 G(ther means to incorporate ne)-2.5E 2.5(wb)-.25 G(indings.)-2.5 E F1 -.92(Va)87 136.8 S(riables).92 E F0.043(Readline has v)108 148.8 R .044(ariables that can be used to further customize its beha)-.25 F(vior)-.2E 5.044(.A)-.55 G -.25(va)-2.5 G .044(riable may be set in the).25 F F2(inpu-)2.544 E(tr)108 160.8 Q(c)-.37 E F0(\214le with a statement of the form)2.5 E F1(set)144 177.6 Q F2(variable\255name value)2.5 E F0 .807(Except where noted, readline v)108194.4 R .807(ariables can tak)-.25 F 3.307(et)-.1 G .807(he v)-3.307 F(alues)-.25 E F1(On)3.307 E F0(or)3.307 E F1(Off)3.307 E F0 .807(\(without re)3.307 F -.05(ga)-.15 G .807(rd to case\).).05 F .807(The v)5.807 F(ari-)-.25 E(ables and their def)108 206.4 Q(ault v)-.1 E(alues are:)-.25 E F1(bell\255style \(audible\))108 223.2 Q F0 .01(Controls what happens when readline w)144 235.2 R .011(ants to ring the terminal bell.)-.1 F .011(If set to)5.011 F F1(none)2.511 E F0 2.511(,r)C .011(eadline ne)-2.511 F -.15(ve)-.25 G(r).15 E.94(rings the bell.)144 247.2 R .94(If set to)5.94 F F1(visible)3.44 EF0 3.44(,r)C .94(eadline uses a visible bell if one is a)-3.44 F -.25(va)-.2 G 3.44(ilable. If).25 F .94(set to)3.44 F F1(audible)3.44 E F0(,)A(readline attempts to ring the terminal')144 259.2 Q 2.5(sb)-.55 G(ell.)-2.5 E F1(comment\255begin \(`)108 271.2 Q(`#')-.63 E('\))-.63 EF0 .062(The string that is inserted in)144 283.2 R F1(vi)2.562 E F0 .062(mode when the)2.562 F F1(insert\255comment)2.562 E F0 .062(command is e)2.562 F -.15(xe)-.15 G 2.562(cuted. This).15 F(com-)2.562E(mand is bound to)144 295.2 Q F1(M\255#)2.5 E F0(in emacs mode and to)2.5 E F1(#)2.5 E F0(in vi command mode.)2.5 E F1(completion\255ignor)108307.2 Q(e\255case \(Off\))-.18 E F0(If set to)144 319.2 Q F1(On)2.5 E F02.5(,r)C(eadline performs \214lename matching and completion in a case\\255insensiti)-2.5 E .3 -.15(ve f)-.25 H(ashion.).05 E F1(completion\255query\255items \(100\))108 331.2 Q F0 .53(This determines when the user is queried about vie)144 343.2 R .529(wing the number of possible completions gen-)-.25 F .56(erated by the)144 355.2 R F1(possible\255completions)3.06 E F0 3.06(command. It)3.06 F.561(may be set to an)3.061 F 3.061(yi)-.15 G(nte)-3.061 E .561(ger v)-.15 F .561(alue greater than or)-.25 F .783(equal to zero.)144 367.2 R.783(If the number of possible completions is greater than or equal to \the v)5.783 F .782(alue of this)-.25 F -.25(va)144 379.2 S .237(riable, the user is ask).25 F .237(ed whether or not he wishes to vie)-.1 F 2.737(wt)-.25 G .237(hem; otherwise the)-2.737 F 2.737(ya)-.15 G.237(re simply listed)-2.737 F(on the terminal.)144 391.2 Q F1(con)108
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -