📄 rluserman.ps
字号:
(cop)o(ying,)g(pro)o(vided)h(that)e(the)h(en)o(tire)h(resulting)g(deriv)o(ed)g(w)o(ork)e(is)h(distributed)75 802 y(under)h(the)f(terms)g(of)g(a)f(p)q(ermission)j(notice)f(iden)o(tical)h(to)e(this)g(one.)75869 y(P)o(ermission)i(is)g(gran)o(ted)f(to)g(cop)o(y)h(and)f(distribute)i(translations)f(of)f(this)h(man)o(ual)g(in)o(to)f(another)g(lan-)75 924 y(guage,)e(under)h(the)f(ab)q(o)o(v)o(e)g(conditions)i(for)d(mo)q(di\014ed)j(v)o(ersions,)e(except)h(that)f(this)h(p)q(ermission)g(notice)75 979 y(ma)o(y)f(b)q(e)i(stated)f(in)h(a)f(translation)g(appro)o(v)o(ed)g(b)o(y)g(the)g(F)l(ree)h(Soft)o(w)o(are)d(F)l(oundation.)75 2661 y(Cop)o(yrigh)o(t)301 2660 y(c)2892661 y Fj(\015)h Fm(1988-2002)f(F)l(ree)i(Soft)o(w)o(are)f(F)l(oundation,)h(Inc.)p eop%%Page: 1 31 2 bop 75 -58 a Fm(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1077b(1)75 149 y Fi(1)41 b(Command)28 b(Line)e(Editing)137271 y Fm(This)16 b(c)o(hapter)f(describ)q(es)i(the)e(basic)h(features)f(of)g(the)g Fh(gnu)g Fm(command)g(line)i(editing)f(in)o(terface.)75403 y Fk(1.1)33 b(In)n(tro)r(duction)24 b(to)e(Line)i(Editing)137501 y Fm(The)16 b(follo)o(wing)g(paragraphs)e(describ)q(e)j(the)e(notation)g(used)h(to)e(represen)o(t)i(k)o(eystrok)o(es.)137569 y(The)h(text)f Fg(C-k)h Fm(is)g(read)g(as)f(`Con)o(trol-K')g(and)h(describ)q(es)h(the)f(c)o(haracter)f(pro)q(duced)h(when)h(the)1831567 y Ff(h)p 1844 541 19 2 v 1844 569 a Fe(k)p 1844 577V 1860 567 a Ff(i)75 624 y Fm(k)o(ey)d(is)h(pressed)g(while)g(the)f(Con)o(trol)g(k)o(ey)g(is)h(depressed.)137 693 y(The)g(text)gFg(M-k)f Fm(is)i(read)f(as)f(`Meta-K')g(and)h(describ)q(es)i(the)e(c)o(haracter)f(pro)q(duced)i(when)g(the)f(Meta)75 747 y(k)o(ey)e(\(if)g(y)o(ou)g(ha)o(v)o(e)g(one\))g(is)h(depressed,)g(and)f(the)930745 y Ff(h)p 942 719 V 942 747 a Fe(k)p 942 755 V 958745 a Ff(i)987 747 y Fm(k)o(ey)g(is)h(pressed.)20 b(The)15b(Meta)e(k)o(ey)h(is)h(lab)q(eled)1779 745 y Ff(h)p 1791719 72 2 v 1791 747 a Fe(AL)m(T)p 1791 755 V 1860 745a Ff(i)75 802 y Fm(on)e(man)o(y)g(k)o(eyb)q(oards.)19b(On)13 b(k)o(eyb)q(oards)g(with)h(t)o(w)o(o)e(k)o(eys)g(lab)q(eled)1213 800 y Ff(h)p 1225 774 V 1225 802 a Fe(AL)m(T)p 1225810 V 1294 800 a Ff(i)1322 802 y Fm(\(usually)i(to)e(either)i(side)g(of)f(the)75 857 y(space)j(bar\),)f(the)388 855 y Ff(h)p400 829 V 400 857 a Fe(AL)m(T)p 400 865 V 469 855 a Ff(i)499857 y Fm(on)h(the)g(left)g(side)g(is)g(generally)h(set)f(to)f(w)o(ork)g(as)g(a)g(Meta)g(k)o(ey)l(.)22 b(The)1697 855 y Ff(h)p1709 829 V 1709 857 a Fe(AL)m(T)p 1709 865 V 1778 855a Ff(i)1808 857 y Fm(k)o(ey)75 912 y(on)17 b(the)f(righ)o(t)h(ma)o(y)f(also)h(b)q(e)g(con\014gured)g(to)f(w)o(ork)g(as)g(a)h(Meta)f(k)o(ey)g(or)g(ma)o(y)g(b)q(e)i(con\014gured)f(as)f(some)75 967y(other)f(mo)q(di\014er,)h(suc)o(h)f(as)g(a)g(Comp)q(ose)g(k)o(ey)g(for)f(t)o(yping)i(accen)o(ted)f(c)o(haracters.)137 1035y(If)c(y)o(ou)g(do)g(not)f(ha)o(v)o(e)h(a)f(Meta)h(or)6941033 y Ff(h)p 706 1007 V 706 1035 a Fe(AL)m(T)p 706 1043V 775 1033 a Ff(i)801 1035 y Fm(k)o(ey)l(,)g(or)g(another)f(k)o(ey)h(w)o(orking)f(as)h(a)f(Meta)h(k)o(ey)l(,)g(the)g(iden)o(tical)751090 y(k)o(eystrok)o(e)f(can)i(b)q(e)g(generated)f(b)o(y)g(t)o(yping)809 1088 y Ff(h)p 822 1062 70 2 v 822 1090 a Fe(ESC)p822 1098 V 888 1088 a Ff(i)915 1090 y Fd(\014rst)p Fm(,)g(and)g(then)h(t)o(yping)1339 1088 y Ff(h)p 1351 1062 19 2 v 1351 1090a Fe(k)p 1351 1098 V 1368 1088 a Ff(i)1383 1090 y Fm(.)18b(Either)12 b(pro)q(cess)f(is)h(kno)o(wn)75 1145 y(as)jFc(metafying)k Fm(the)425 1143 y Ff(h)p 437 1117 V 4371145 a Fe(k)p 437 1153 V 454 1143 a Ff(i)484 1145 y Fm(k)o(ey)l(.)1371214 y(The)i(text)e Fg(M-C-k)h Fm(is)h(read)f(as)f(`Meta-Con)o(trol-k')g(and)h(describ)q(es)i(the)e(c)o(haracter)g(pro)q(duced)h(b)o(y)751268 y Fc(metafying)e Fg(C-k)p Fm(.)137 1337 y(In)g(addition,)h(sev)o(eral)f(k)o(eys)f(ha)o(v)o(e)g(their)h(o)o(wn)f(names.)30b(Sp)q(eci\014cally)l(,)1384 1335 y Ff(h)p 1396 130973 2 v 1396 1337 a Fe(DEL)p 1396 1345 V 1467 1335 a Ff(i)14821337 y Fm(,)1514 1335 y Ff(h)p 1526 1309 70 2 v 15261337 a Fe(ESC)p 1526 1345 V 1593 1335 a Ff(i)1608 1337y Fm(,)1640 1335 y Ff(h)p 1652 1309 72 2 v 1652 1337a Fe(LFD)p 1652 1345 V 1722 1335 a Ff(i)1737 1337 y Fm(,)17681335 y Ff(h)p 1780 1309 70 2 v 1780 1337 a Fe(SPC)p 17801345 V 1847 1335 a Ff(i)1862 1337 y Fm(,)75 1390 y Ff(h)p87 1364 76 2 v 87 1392 a Fe(RET)p 87 1399 V 160 1390a Ff(i)175 1392 y Fm(,)23 b(and)306 1390 y Ff(h)p 3181364 74 2 v 318 1392 a Fe(T)m(AB)p 318 1399 V 390 1390a Ff(i)427 1392 y Fm(all)f(stand)g(for)f(themselv)o(es)h(when)h(seen)f(in)g(this)g(text,)h(or)e(in)i(an)e(init)i(\014le)g(\(see)751447 y(Section)d(1.3)f([Readline)h(Init)g(File],)h(page)e(4\).)32b(If)19 b(y)o(our)g(k)o(eyb)q(oard)h(lac)o(ks)f(a)14441445 y Ff(h)p 1456 1419 72 2 v 1456 1447 a Fe(LFD)p 14561454 V 1526 1445 a Ff(i)1560 1447 y Fm(k)o(ey)l(,)h(t)o(yping)18021445 y Ff(h)p 1814 1419 49 2 v 1814 1447 a Fe(C-j)p 18141454 V 1860 1445 a Ff(i)75 1501 y Fm(will)c(pro)q(duce)g(the)f(desired)h(c)o(haracter.)j(The)874 1499 y Ff(h)p 886 1473 76 2v 886 1501 a Fe(RET)p 886 1509 V 959 1499 a Ff(i)9891501 y Fm(k)o(ey)c(ma)o(y)f(b)q(e)h(lab)q(eled)1385 1499y Ff(h)p 1397 1473 109 2 v 1397 1501 a Fe(Return)p 13971509 V 1503 1499 a Ff(i)1533 1501 y Fm(or)1588 1499 yFf(h)p 1600 1473 86 2 v 1600 1501 a Fe(En)o(ter)p 16001509 V 1684 1499 a Ff(i)1714 1501 y Fm(on)f(some)75 1556y(k)o(eyb)q(oards.)75 1688 y Fk(1.2)33 b(Readline)23b(In)n(teraction)137 1786 y Fm(Often)13 b(during)h(an)e(in)o(teractiv)o(e)h(session)g(y)o(ou)g(t)o(yp)q(e)f(in)i(a)e(long)h(line)h(of)e(text,)h(only)g(to)f(notice)h(that)f(the)75 1841 y(\014rst)k(w)o(ord)f(on)h(the)h(line)h(is)e(missp)q(elled.)26 b(The)16 b(Readline)i(library)f(giv)o(es)f(y)o(ou)g(a)g(set)g(of)g(commands)g(for)751896 y(manipulating)g(the)f(text)g(as)f(y)o(ou)h(t)o(yp)q(e)g(it)g(in,)g(allo)o(wing)h(y)o(ou)f(to)f(just)h(\014x)g(y)o(our)f(t)o(yp)q(o,)g(and)h(not)g(forcing)75 1950 y(y)o(ou)f(to)f(ret)o(yp)q(e)h(the)g(ma)s(jorit)o(y)f(of)h(the)g(line.)21 b(Using)15 b(these)f(editing)h(commands,)f(y)o(ou)g(mo)o(v)o(e)f(the)h(cursor)75 2005y(to)i(the)i(place)g(that)e(needs)i(correction,)g(and)f(delete)h(or)f(insert)g(the)h(text)e(of)h(the)g(corrections.)26 b(Then,)752060 y(when)16 b(y)o(ou)f(are)h(satis\014ed)g(with)g(the)f(line,)i(y)o(ou)e(simply)i(press)1160 2058 y Ff(h)p 1172 2032 762 v 1172 2060 a Fe(RET)p 1172 2068 V 1245 2058 a Ff(i)12602060 y Fm(.)k(Y)l(ou)16 b(do)f(not)h(ha)o(v)o(e)f(to)g(b)q(e)h(at)f(the)75 2115 y(end)k(of)e(the)h(line)i(to)d(press)5632113 y Ff(h)p 575 2087 V 575 2115 a Fe(RET)p 575 2122V 648 2113 a Ff(i)663 2115 y Fm(;)i(the)f(en)o(tire)h(line)g(is)g(accepted)f(regardless)g(of)g(the)g(lo)q(cation)g(of)g(the)752170 y(cursor)d(within)h(the)g(line.)75 2284 y Fb(1.2.1)30b(Readline)20 b(Bare)g(Essen)n(tials)137 2382 y Fm(In)12b(order)g(to)f(en)o(ter)g(c)o(haracters)g(in)o(to)g(the)h(line,)h(simply)g(t)o(yp)q(e)f(them.)18 b(The)12 b(t)o(yp)q(ed)g(c)o(haracter)f(app)q(ears)75 2437 y(where)16 b(the)h(cursor)f(w)o(as,)f(and)h(then)h(the)f(cursor)g(mo)o(v)o(es)g(one)g(space)g(to)g(the)g(righ)o(t.)23b(If)17 b(y)o(ou)f(mist)o(yp)q(e)g(a)75 2492 y(c)o(haracter,)e(y)o(ou)h(can)g(use)h(y)o(our)f(erase)g(c)o(haracter)f(to)h(bac)o(k)g(up)g(and)h(delete)g(the)f(mist)o(yp)q(ed)h(c)o(haracter.)137 2560y(Sometimes)g(y)o(ou)f(ma)o(y)g(mist)o(yp)q(e)h(a)f(c)o(haracter,)f(and)i(not)f(notice)h(the)f(error)g(un)o(til)i(y)o(ou)e(ha)o(v)o(e)g(t)o(yp)q(ed)75 2615 y(sev)o(eral)g(other)f(c)o(haracters.)19b(In)c(that)e(case,)i(y)o(ou)f(can)g(t)o(yp)q(e)h Fg(C-b)fFm(to)g(mo)o(v)o(e)f(the)i(cursor)f(to)g(the)g(left,)h(and)752670 y(then)h(correct)e(y)o(our)h(mistak)o(e.)20 b(Afterw)o(ards,)13b(y)o(ou)i(can)g(mo)o(v)o(e)g(the)g(cursor)g(to)g(the)g(righ)o(t)g(with)g Fg(C-f)p Fm(.)p eop%%Page: 2 42 3 bop 75 -58 a Fm(2)1322 b(GNU)15 b(Readline)h(Library)137149 y(When)h(y)o(ou)f(add)g(text)g(in)h(the)g(middle)h(of)e(a)f(line,)j(y)o(ou)e(will)i(notice)f(that)f(c)o(haracters)f(to)h(the)g(righ)o(t)75204 y(of)e(the)g(cursor)g(are)g(`pushed)h(o)o(v)o(er')f(to)f(mak)o(e)h(ro)q(om)g(for)f(the)i(text)f(that)f(y)o(ou)h(ha)o(v)o(e)g(inserted.)21b(Lik)o(ewise,)75 259 y(when)e(y)o(ou)g(delete)h(text)e(b)q(ehind)j(the)e(cursor,)g(c)o(haracters)f(to)g(the)h(righ)o(t)f(of)g(the)h(cursor)g(are)f(`pulled)75 314 y(bac)o(k')11 b(to)g(\014ll)h(in)h(the)e(blank)h(space)g(created)f(b)o(y)h(the)f(remo)o(v)m(al)g(of)g(the)h(text.)18 b(A)11 b(list)h(of)f(the)h(bare)f(essen)o(tials)75369 y(for)k(editing)h(the)f(text)g(of)g(an)g(input)h(line)h(follo)o(ws.)75 449 y Fg(C-b)168 b Fm(Mo)o(v)o(e)14 b(bac)o(k)h(one)h(c)o(haracter.)75 530 y Fg(C-f)168 b Fm(Mo)o(v)o(e)14 b(forw)o(ard)g(one)h(c)o(haracter.)75 608 y Ff(h)p 87 582 73 2 v 87 610 aFe(DEL)p 87 618 V 158 608 a Ff(i)188 610 y Fm(or)244608 y Ff(h)p 256 582 159 2 v 256 610 a Fe(Bac)o(kspace)p256 618 V 412 608 a Ff(i)315 665 y Fm(Delete)h(the)f(c)o(haracter)g(to)f(the)h(left)h(of)f(the)g(cursor.)75 745 y Fg(C-d)168b Fm(Delete)16 b(the)f(c)o(haracter)g(underneath)h(the)f(cursor.)75825 y(Prin)o(ting)h(c)o(haracters)315 880 y(Insert)f(the)h(c)o(haracter)e(in)o(to)h(the)h(line)h(at)d(the)h(cursor.)75961 y Fg(C-_)g Fm(or)f Fg(C-x)h(C-u)315 1015 y Fm(Undo)i(the)g(last)f(editing)i(command.)25 b(Y)l(ou)17 b(can)g(undo)g(all)g(the)g(w)o(a)o(y)f(bac)o(k)h(to)f(an)g(empt)o(y)315 1070 y(line.)751151 y(\(Dep)q(ending)i(on)f(y)o(our)g(con\014guration,)g(the)8631149 y Ff(h)p 875 1123 V 875 1151 a Fe(Bac)o(kspace)p875 1159 V 1032 1149 a Ff(i)1063 1151 y Fm(k)o(ey)g(b)q(e)h(set)f(to)f(delete)i(the)f(c)o(haracter)g(to)f(the)75 1206 y(left)h(of)f(the)h(cursor)f(and)g(the)596 1204 y Ff(h)p 608 1178 73 2 v608 1206 a Fe(DEL)p 608 1213 V 679 1204 a Ff(i)710 1206y Fm(k)o(ey)h(set)f(to)g(delete)h(the)g(c)o(haracter)f(underneath)h(the)g(cursor,)f(lik)o(e)75 1260 y Fg(C-d)p Fm(,)e(rather)h(than)g(the)g(c)o(haracter)g(to)f(the)i(left)f(of)g(the)g(cursor.\))751374 y Fb(1.2.2)30 b(Readline)20 b(Mo)n(v)n(emen)n(t)i(Commands)1371471 y Fm(The)14 b(ab)q(o)o(v)o(e)e(table)i(describ)q(es)g(the)g(most)e(basic)i(k)o(eystrok)o(es)d(that)i(y)o(ou)g(need)h(in)f(order)g(to)g(do)g(editing)75 1526 y(of)f(the)h(input)h(line.)21 b(F)l(or)12b(y)o(our)g(con)o(v)o(enience,)i(man)o(y)f(other)f(commands)h(ha)o(v)o(e)f(b)q(een)i(added)f(in)h(addition)75 1580 y(to)h Fg(C-b)pFm(,)h Fg(C-f)p Fm(,)f Fg(C-d)p Fm(,)g(and)522 1578 yFf(h)p 534 1552 V 534 1580 a Fe(DEL)p 534 1588 V 6051578 a Ff(i)619 1580 y Fm(.)23 b(Here)16 b(are)g(some)f(commands)h(for)f(mo)o(ving)h(more)g(rapidly)h(ab)q(out)f(the)75 1635y(line.)75 1716 y Fg(C-a)168 b Fm(Mo)o(v)o(e)14 b(to)h(the)g(start)f(of)h(the)g(line.)75 1796 y Fg(C-e)168 b Fm(Mo)o(v)o(e)14b(to)h(the)g(end)h(of)f(the)g(line.)75 1876 y Fg(M-f)168b Fm(Mo)o(v)o(e)14 b(forw)o(ard)g(a)h(w)o(ord,)f(where)i(a)e(w)o(ord)h(is)h(comp)q(osed)f(of)g(letters)g(and)h(digits.)75 1957y Fg(M-b)168 b Fm(Mo)o(v)o(e)14 b(bac)o(kw)o(ard)h(a)g(w)o(ord.)752037 y Fg(C-l)168 b Fm(Clear)15 b(the)h(screen,)f(reprin)o(ting)h(the)f(curren)o(t)g(line)i(at)e(the)g(top.)137 2118 y(Notice)e(ho)o(w)fFg(C-f)g Fm(mo)o(v)o(es)f(forw)o(ard)g(a)h(c)o(haracter,)g(while)iFg(M-f)e Fm(mo)o(v)o(es)f(forw)o(ard)g(a)h(w)o(ord.)18b(It)13 b(is)g(a)f(lo)q(ose)75 2173 y(con)o(v)o(en)o(tion)j(that)f(con)o(trol)h(k)o(eystrok)o(es)f(op)q(erate)h(on)f(c)o(haracters)h(while)h(meta)e(k)o(eystrok)o(es)g(op)q(erate)h(on)75 2227 y(w)o(ords.)752341 y Fb(1.2.3)30 b(Readline)20 b(Killing)h(Commands)1372438 y Fc(Killing)26 b Fm(text)18 b(means)g(to)g(delete)i(the)f(text)f(from)g(the)h(line,)i(but)d(to)g(sa)o(v)o(e)g(it)h(a)o(w)o(a)o(y)e(for)h(later)h(use,)75 2493 y(usually)f(b)o(y)f Fc(y)o(anking)22b Fm(\(re-inserting\))17 b(it)g(bac)o(k)g(in)o(to)g(the)h(line.)27b(\(`Cut')15 b(and)j(`paste')e(are)g(more)h(recen)o(t)752547 y(jargon)d(for)h(`kill')h(and)g(`y)o(ank'.\))1372615 y(If)g(the)f(description)h(for)f(a)g(command)g(sa)o(ys)f(that)h(it)g(`kills')h(text,)e(then)i(y)o(ou)f(can)g(b)q(e)h(sure)f(that)f(y)o(ou)75 2670 y(can)h(get)g(the)g(text)g(bac)o(k)g(in)h(a)f(di\013eren)o(t)g(\(or)g(the)g(same\))g(place)h(later.)p eop%%Page: 3 53 4 bop 75 -58 a Fm(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1077b(3)137 149 y(When)12 b(y)o(ou)g(use)g(a)f(kill)i(command,)f(the)g(text)f(is)h(sa)o(v)o(ed)f(in)i(a)e Fc(kill-ring)p Fm(.)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -