%!PS-Adobe-3.0
%%Creator: groff version 1.20.1
%%CreationDate: Wed Feb 23 01:12:36 2011
%%DocumentNeededResources: font Times-Bold
%%+ font Times-Italic
%%+ font Times-Roman
%%+ font Courier
%%DocumentSuppliedResources: procset grops 1.20 1
%%Pages: 15
%%PageOrder: Ascend
%%DocumentMedia: Default 595 842 0 () ()
%%Orientation: Portrait
%%EndComments
%%BeginDefaults
%%PageMedia: Default
%%EndDefaults
%%BeginProlog
%%BeginResource: procset grops 1.20 1
%!PS-Adobe-3.0 Resource-ProcSet
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/MANUAL{
statusdict begin/manualfeed true store end
}bind def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
DEFS/BPhook known{DEFS begin BPhook end}if
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/Fr{
setrgbcolor fill
}bind def
/setcmykcolor where{
pop
/Fk{
setcmykcolor fill
}bind def
}if
/Fg{
setgray fill
}bind def
/FL/fill load def
/LW/setlinewidth load def
/Cr/setrgbcolor load def
/setcmykcolor where{
pop
/Ck/setcmykcolor load def
}if
/Cg/setgray load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne
2 index/UniqueID ne
and
{def}{pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[]0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{}def
/setpagedevice{}def
mark
}bind def
/PEND{
cleartomark
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%EndProlog
%%BeginSetup
%%BeginFeature: *PageSize Default
<< /PageSize [ 595 842 ] /ImagingBBox null >> setpagedevice
%%EndFeature
%%IncludeResource: font Times-Bold
%%IncludeResource: font Times-Italic
%%IncludeResource: font Times-Roman
%%IncludeResource: font Courier
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
def/PL 841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron
/Zcaron/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
/Courier@0 ENC0/Courier RE/Times-Roman@0 ENC0/Times-Roman RE
/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 18/Times-Bold@0 SF 3(An Intr)182.4 20 R 3(oduction to the Z Shell)
-.324 F/F1 14/Times-Italic@0 SF -1.12(Pa)270.137 56 S 1.166(ul F)1.12 F
(alstad)-1.05 E(pf@softwar)256.951 72 Q -.21(e.)-.518 G(com).21 E 1.166
(Bas de Bakk)264.472 104 R(er)-.14 E(bas@phys.uva.nl)257.952 120 Q 0 Cg
EP
%%Page: 1 2
%%BeginPageSetup
BP
%%EndPageSetup
0 Cg EP
%%Page: 1 3
%%BeginPageSetup
BP
%%EndPageSetup
/F0 14/Times-Roman@0 SF 3.472(An Introduction to the Z Shell P)72 16 R
3.471(aul F)-.21 F 3.471(alstad pf@softw)-.21 F 3.471
(are.com Bas de Bakk)-.14 F(er)-.14 E(bas@ph)72 32 Q(ys.uv)-.07 E 1.811
(a.nl Introduction Introduction)-.35 F/F1 14/Times-Bold@0 SF(zsh)5.311 E
F0 1.812(is a shell designed for interacti)5.311 F -.21(ve)-.35 G 2.335
(use, although it is also a po)72 48 R 2.335(werful scripting language.)
-.35 F(Man)10.501 E 5.835(yo)-.21 G 5.835(ft)-5.835 G 2.335
(he useful fea-)-5.835 F 2.533
(tures of bash, ksh, and tcsh were incorporated into)72 64 R F1(zsh)
6.034 E F0 6.034(;m)C(an)-6.034 E 6.034(yo)-.21 G 2.534
(riginal features)-6.034 F 2.473(were added.)72 80 R 2.473
(This document details some of the unique features of)10.639 F F1(zsh)
5.972 E F0 10.638(.I)C 5.972(ta)-10.638 G(s-)-5.972 E 3.54
(sumes basic kno)72 96 R 3.54
(wledge of the standard UNIX shells; the intent is to sho)-.35 F 7.041
(wa)-.35 G 1.837(reader already f)72 112 R 1.837
(amiliar with one of the other major shells what mak)-.14 F(es)-.14 E F1
(zsh)5.336 E F0(more)5.336 E 2.688(useful or more po)72 128 R 7.354
(werful. This)-.35 F 2.688(document is not at all comprehensi)6.188 F
-.21(ve)-.35 G 6.189(;r).21 G 2.689(ead the)-6.189 F 1.244(manual entry\
 for a description of the shell that is complete and concise, although)
72 144 R(some)72 160 Q 1.527(what o)-.35 F -.21(ve)-.21 G 1.527
(rwhelming and de).21 F -.28(vo)-.35 G 1.528(id of e).28 F 6.194
(xamples. The)-.21 F(te)5.028 E 1.528(xt will frequently men-)-.21 F
1.77(tion options that you can set to change the beha)72 176 R 1.77
(viour of)-.28 F F1(zsh)5.27 E F0 9.936(.Y)C 1.769(ou can set these)
-11.476 F 3.828(options with the command)72 187 R/F2 9/Courier@0 SF 5.4
(%s)7.328 G(etopt)-5.4 E/F3 9/Times-Italic@0 SF(optionname)5.4 E F0
2.663(and unset them ag)7.613 F 2.663(ain with)-.07 F F2 5.4(%u)6.163 G
(nse-)-5.4 E(topt)72 203 Q F3(optionname)5.4 E F0 .607
(Case is ignored in option names, as are embedded underscores.)5.557 F
(File-)7.606 E 3.088(name Generation Filename Generation Otherwise kno)
72 219 R 3.088(wn as)-.35 F/F4 14/Times-Italic@0 SF(globbing)6.588 E F0
6.588<2c8c>C(lename)-6.588 E 2.329(generation is quite e)72 230 R
(xtensi)-.21 E 2.749 -.21(ve i)-.35 H(n).21 E F1(zsh)5.829 E F0 9.329
(.O)C 5.829(fc)-9.329 G 2.328(ourse, it has all the basics:)-5.829 F F2
5.4(%l)5.828 G 7.278(sM)-5.4 G(ake-)-7.278 E 10.8(file file.pro foo.o)72
241 R 21.6(main.o q.c)32.4 F 21.6(run234 stuff)43.2 F 27(bar.o foo)72
252 R 32.4(link morestuff)43.2 F 21.6(run123 run240 sub)10.8 F 21.6
(file.h foo.c)72 263 R 21.6(main.h pipe)32.4 F 32.4(run2 run303)37.8 F
5.4(%l)20.7 G 5.4(s*)-5.4 G 15.3(.c foo.c)-5.4 F(q.c)10.8 E 5.4(%l)72
274 S 5.4(s*)-5.4 G 3.713(.[co] bar.o)-5.4 F 10.8(foo.c foo.o main.o)
16.2 F 3.713(q.c %)10.8 F(ls foo.?)5.4 E 5.4(foo.c foo.o)14.062 F 5.4
(%l)9.112 G 5.4(s*)-5.4 G(.[^c])-5.4 E 10.8(bar.o file.h)72 290 R 10.8
(foo.o main.h)10.8 F .464(main.o %)10.8 F(ls *.[^oh])5.4 E 5.4
(foo.c q.c)5.864 F F0 .915(Also, if the)5.865 F F4(EXTEND-)4.415 E
(EDGLOB)72 306 Q F0 .646(option is set, some ne)4.146 F 4.146(wf)-.35 G
.646(eatures are acti)-4.146 F -.35(va)-.35 G 4.146(ted. F).35 F .645
(or e)-.21 F .645(xample, the)-.21 F/F5 14/Courier@0 SF(^)4.145 E F0
(char)4.145 E(-)-.28 E 5.154(acter ne)72 317 R -.07(ga)-.21 G 5.154
(tes the pattern follo).07 F 5.154(wing it:)-.35 F F2 5.4(%s)8.654 G
(etopt extendedglob)-5.4 E 5.4(%l)10.105 G 5.4(s-)-5.4 G 5.4(d^)-5.4 G
4.705(*.c Make-)-5.4 F 10.8(file file.pro link)72 328 R 5.4
(morestuff run2)37.8 F(run303)37.8 E 27(bar.o foo)72 339 R 21.6
(main.h pipe)43.2 F 21.6(run234 stuff)37.8 F 21.6(file.h foo.o)72 350 R
21.6(main.o run123 run240 sub)32.4 F 5.4(%l)29.025 G 5.4(s-)-5.4 G 5.4
(d^)-5.4 G 28.575(*.* Make-)-5.4 F 10.8(file link)72 361 R 32.4
(pipe run2 run240)37.8 F(stuff)27 E 37.8(foo morestuff)72 372 R 21.6
(run123 run234 run303 sub)10.8 F 5.4(%l)63 G 5.4(s-)-5.4 G 5.4(d^)-5.4 G
(Makefile)-5.4 E 27(bar.o foo)72 383 R 32.4(link morestuff)43.2 F 21.6
(run123 run240 sub)10.8 F 21.6(file.h foo.c)72 394 R 21.6(main.h pipe)
32.4 F 32.4(run2 run303)37.8 F 10.8(file.pro foo.o)72 405 R 21.6
(main.o q.c)32.4 F 21.6(run234 stuff)43.2 F 5.4(%l)79.2 G 5.4(s-)-5.4 G
5.4(d*)-5.4 G(.^c)-5.4 E 10.8(.rhosts bar.o)72 421 R 16.2
(file.h file.pro)27 F 21.6(foo.o main.h)10.8 F(main.o)21.6 E F0 3.737
(An e)8.688 F 3.737(xpression of)-.21 F 4.815(the form)72 432 R F5(<)
8.315 E F4(x)A F0<ad>A F4(y)A F5(>)A F0 4.816(matches a range of inte)
8.316 F(gers:)-.21 E F2 5.4(%l)8.316 G 5.4(sr)-5.4 G 4.366
(un<200-300> run234)-5.4 F(run240)10.8 E 5.4(%l)72 443 S 5.4(sr)-5.4 G
1.5(un<300-400> run303 %)-5.4 F(ls run<-200>)5.4 E 5.4(run123 run2)6.9 F
5.4(%l)6.9 G 5.4(sr)-5.4 G 1.5(un<300-> run303 %)-5.4 F(ls run<>)5.4 E
5.4(run123 run2)72 459 R 5.4(run234 run240 run303)21.6 F F0(The)7.209 E
F4(NUMERICGLOBSORT)5.759 E F0 2.259(option will sort)5.759 F 1.132
(\214les with numbers according to the number)72 475 R 8.132(.T)-.77 G
1.132(his will not w)-8.132 F 1.132(ork with)-.14 F F5(ls)4.631 E F0
1.131(as it re-)4.631 F 39.127(sorts its ar)72 486 R(guments:)-.252 E F2
5.4(%s)42.628 G(etopt numericglobsort)-5.4 E 5.4(%e)44.078 G(cho run<>)
-5.4 E(run2 run123 run234 run240 run303)72 497 Q F0 20.142
(Grouping is possible:)25.092 F F2 5.4(%l)23.641 G 5.4(s\()-5.4 G
(foo|bar\).*)-5.4 E 5.4(bar.o foo.c foo.o)72 508 R 5.4(%l)279 G 5.4(s*)
-5.4 G(.\(c|o|pro\))-5.4 E 21.6(bar.o file.pro)72 524 R 21.6
(foo.c foo.o main.o)10.8 F(q.c)21.6 E F0 2.465(Also, the string)7.415 F
F5(**/)5.964 E F0 2.464(forces a)5.964 F(recursi)72 535 Q 41.15 -.21
(ve s)-.35 H 40.73(earch of subdirectories:).21 F F2 5.4(%l)44.23 G 5.4
(s-)-5.4 G 45.68(RM)-5.4 G(ake-)-45.68 E 10.8(file file.pro foo.o)72 546
R 21.6(main.o q.c)32.4 F 21.6(run234 stuff)43.2 F 27(bar.o foo)72 557 R
32.4(link morestuff)43.2 F 21.6(run123 run240 sub)10.8 F 21.6
(file.h foo.c)72 568 R 21.6(main.h pipe)32.4 F 32.4(run2 run303)37.8 F
(morestuff:)72 590 Q -.45(stuff: file)72 612 R 10.8(xxx yyy)10.8 F -.45
(stuff/xxx: foobar)72 634 R 14.4(stuff/yyy: frobar %)72 656 R
(ls **/*bar)5.4 E 5.4(stuff/xxx/foobar stuff/yyy/frobar)19.8 F 5.4(%l)
19.8 G 5.4(s*)-5.4 G(*/f*)-5.4 E 59.4(file.h foo)72 667 R 64.8
(foo.o stuff/xxx/foobar)81 F 48.6(file.pro foo.c)72 678 R 37.8
(stuff/file stuff/yyy/frobar)70.2 F 5.4(%l)36 G 5.4(s*)-5.4 G(bar*)-5.4
E 39.6(bar.o %)72 689 R(ls **/*bar*)5.4 E 64.8(bar.o stuff/xxx/foobar)45
F(stuff/yyy/frobar)10.8 E 5.4(%l)72 705 S 5.4(ss)-5.4 G 1.682
(tuff/**/*bar* stuff/xxx/foobar)-5.4 F(stuff/yyy/frobar)10.8 E F0 2.131
(It is possible to e)7.081 F 2.131(xclude cer)-.21 F(-)-.28 E 5.762
(tain \214les from the patterns using the ~ character)72 721 R 12.762
(.A)-.77 G 5.763(pattern of the form)-3.5 F F5(*.c~bar.c)72 732 Q F0
3.03(lists all \214les matching)6.531 F F5(*.c)6.53 E F0 6.53(,e)C 3.03
(xcept for the \214le)-6.74 F F5(bar.c)6.53 E F0(.)A F2 5.4(%l)10.03 G
5.4(s*)-5.4 G(.c)-5.4 E 16.2(foo.c foob.c bar.c)72 748 R 5.4(%l)5.046 G
5.4(s*)-5.4 G -.353(.c~bar.c foo.c)-5.4 F -.353(foob.c %)21.6 F
(ls *.c~f*)5.4 E(bar.c)5.047 E F0 .097(One can add)5.047 F 3.653(an)72
764 S .153(umber of)-3.653 F F4(quali\214er)3.653 E(s)-.14 E F0 .153
(to the end of an)3.653 F 3.653(yo)-.21 G 3.653(ft)-3.653 G .152
(hese patterns, to restrict matches to cer)-3.653 F(-)-.28 E .617
(tain \214le types.)72 775 R 4.117(Aq)7.617 G .617
(uali\214ed pattern is of the form)-4.117 F F4(pattern)4.117 E F5(\()A
F0(...)A F5(\))A/F6 9/Times-Roman@0 SF .618
(with single-character quali\214ers)7.618 F 44.234
(inside the parentheses.)72 786 R F2 5.4(%a)48.733 G(lias l='ls -dF')
-5.4 E 32.983 5.4(%l* M)49.183 H(ake-)-5.4 E 16.2(file foo*)72 797 R 27
(main.h q.c)43.2 F(run240)48.6 E 0 Cg EP
%%Page: 2 4
%%BeginPageSetup
BP
%%EndPageSetup
/F0 9/Courier@0 SF 32.4(bar.o foo.c main.o)72 11 R 27(run123 run303)32.4
F 27(file.h foo.o)72 22 R 5.4(morestuff/ run2)37.8 F(stuff/)43.2 E 16.2
(file.pro link@)72 33 R 37.8(pipe run234)37.8 F 20.7(sub %)32.4 F 5.4
(l*)5.4 G 20.7(\(/\) morestuff/)-5.4 F(stuff/)10.8 E 5.4(%l*)72 44 S
15.75(\(@\) link@ %)-5.4 F 5.4(l*)5.4 G 15.75(\(*\) foo*)-5.4 F 32.4
(link@ morestuff/)43.2 F 15.75(stuff/ %)10.8 F 5.4(l*)5.4 G(\(x\))-5.4 E
37.8(foo* link@)72 55 R 5.4(morestuff/ stuff/)37.8 F 5.4(%l*)198 G
(\(X\))-5.4 E 37.8(foo* link@)72 66 R 5.4(morestuff/ stuff/)37.8 F 5.4
(%l*)198 G(\(R\))-5.4 E 32.4(bar.o foo*)72 77 R 32.4(link@ morestuff/)
43.2 F 27(run123 run240)10.8 F 27(file.h foo.c)72 88 R 27(main.h pipe)
37.8 F 37.8(run2 run303)43.2 F 16.2(file.pro foo.o)72 99 R 27
(main.o q.c)37.8 F 27(run234 stuff/)48.6 F/F1 9/Times-Roman@0 SF 2.092
(Note that)7.042 F F0(*\(x\))4.342 E F1(and)4.341 E F0(*\(*\))4.341 E F1
.704(both match e)72 110 R -.135(xe)-.135 G(cutables.).135 E F0(*\(X\))
5.204 E F1 .704(matches \214les e)2.954 F -.135(xe)-.135 G .704
(cutable by others, as opposed to).135 F F0(*\(x\))2.955 E F1 2.955(,w)C
.705(hich matches \214les e)-2.955 F -.135(xe)-.135 G .705
(cutable by the).135 F -.225(ow)72 121 S(ner).225 E(.)-.495 E F0(*\(R\))
5.044 E F1(and)2.794 E F0(*\(r\))2.794 E F1 .544
(match readable \214les;)2.794 F F0(*\(W\))2.794 E F1(and)2.794 E F0
(*\(w\))2.794 E F1 2.793(,w)C .543(hich checks for writable \214les.)
-2.793 F F0(*\(W\))5.043 E F1 .543(is especially important,)2.793 F
46.986(since it checks for w)72 132 R 46.986(orld-writable \214les:)-.09
F F0 5.4(%l*)49.236 G(\(w\))-5.4 E 32.4(bar.o foo*)72 143 R 32.4
(link@ morestuff/)43.2 F 27(run123 run240)10.8 F 27(file.h foo.c)72 154
R 27(main.h pipe)37.8 F 37.8(run2 run303)43.2 F 16.2(file.pro foo.o)72
165 R 27(main.o q.c)37.8 F 27(run234 stuff/)48.6 F 5.4(%l*)68.4 G(\(W\))
-5.4 E 10.8(link@ run240)72 176 R 5.4(%l-)96.3 G 5.4(ll)-5.4 G
(ink run240)-5.4 E 5.4(lrwxrwxrwx 1)96.3 F(pfal-)5.4 E 32.4(stad 10)72
187 R(May 23 18:12 link -> /usr/bin/)5.4 E 5.4(-rw-rw-rw- 1)127.8 F
(pfal-)5.4 E 37.8(stad 0)72 198 R(May 23 18:12 run240)5.4 E F1 .53
(If you w)5.48 F .53(ant to ha)-.09 F .8 -.135(ve a)-.18 H .53
(ll the \214les of a certain type as well as all symbolic links).135 F
.707(pointing to \214les of that type, pre\214x the quali\214er with a)
72 209 R F0(-)2.957 E F1(:)A F0 5.4(%l*)2.957 G .256(\(-/\) link@)-5.4 F
5.4(morestuff/ stuff/)37.8 F F1 -.99(Yo)5.656 G 2.956(uc).99 G(an)-2.956
E 13.669(\214lter out the symbolic links with the)72 220 R F0(^)15.919 E
F1(character:)15.92 E F0 5.4(%l*)15.92 G 13.22(\(W^@\) run240 %)-5.4 F
5.4(l*)5.4 G(\(x\))-5.4 E 37.8(foo* link@)72 231 R 5.4
(morestuff/ stuff/)37.8 F 5.4(%l*)6.216 G .816(\(x^@/\) foo*)-5.4 F F1
2.706 -.72(To \214)6.216 H 1.266(nd all plain \214les, you can use).72 F
F0(.)3.515 E F1(:)A F0 5.4(%l*)72 242 S 9(\(.\) Makefile)-5.4 F 16.2
(file.h foo*)10.8 F 21.6(foo.o main.o)32.4 F 16.2(run123 run234 run303)
21.6 F 21.6(bar.o file.pro)72 253 R 21.6(foo.c main.h)10.8 F 32.4
(q.c run2)21.6 F 16.2(run240 sub)32.4 F 5.4(%l*)25.2 G(\(^.\))-5.4 E
32.4(link@ morestuff/)72 264 R 37.8(pipe stuff/)10.8 F 5.4(%ls)14.512 G
14.062(*\(.\) stuff/)-5.4 F 9.113(sub %)16.2 F 5.4(l*)5.4 G 9.113
(\(p\) pipe)-5.4 F 5.4(%l-)72 275 S 5.4(l*)-5.4 G 1.691
(\(p\) prw-r--r--)-5.4 F 5.4(1p)10.8 G 37.8(falstad 0)-5.4 F
(May 23 18:12 pipe)5.4 E(*\(U\))7.091 E F1 2.141(matches all \214les o)
4.391 F 2.14(wned by)-.225 F 9.001(you. T)72 286 R 9.001(os)-.72 G 6.751
(earch for all \214les not o)-9.001 F 6.752(wned by you, use)-.225 F F0
(*\(^U\))9.002 E F1(:)A F0 5.4(%l-)9.002 G 5.4(l*)-5.4 G 6.302
(\(^U\) -rw-------)-5.4 F 5.4(1s)10.8 G(ub-)-5.4 E 32.4(barao 29)72 297
R(May 23 18:13 sub)5.4 E F1 3.067(This searches for setuid \214les:)
8.017 F F0 5.4(%l-)5.316 G 5.4(l*)-5.4 G 2.616(\(s\) -rwsr-xr-x)-5.4 F
5.4(1p)10.8 G(fal-)-5.4 E 32.4(stad 16)72 308 R(May 23 18:12 foo*)5.4 E
F1 6.066(This checks for a certain user')11.016 F 8.316<738c>-.495 G
(les:)-8.316 E F0 5.4(%l-)8.316 G 5.4(l*)-5.4 G(\(u[subbarao]\))-5.4 E
5.4(-rw------- 1)72 319 R 32.4(subbarao 29)5.4 F(May 23 18:13 sub)5.4 E
F1 1.555(Startup Files Startup Files There are \214v)6.505 F 3.805(es)
-.135 G 1.555(tartup \214les)-3.805 F(that)72 330 Q/F2 9/Times-Bold@0 SF
(zsh)5.379 E F1 3.129(will read commands from:)5.379 F F0 2.679
($ZDOTDIR/.zshenv $ZDOTDIR/.zprofile $ZDOTDIR/.zshrc $ZDOT-)5.379 F .661
(DIR/.zlogin $ZDOTDIR/.zlogout)72 341 R F1(If)6.061 E F2(ZDO)3.361 E
(TDIR)-.36 E F1 1.111(is not set, then the v)3.361 F 1.111(alue of)-.225
F F2(HOME)3.361 E F1 1.111(is used; this is the usual case.)3.361 F F0
(.zshenv)72 352 Q F1 .168(is sourced on all in)2.418 F -.18(vo)-.36 G
.168(cations of the shell, unless the).18 F F0(-f)2.419 E F1 .169
(option is set.)2.419 F .169
(It should contain commands to set the command)4.669 F .162
(search path, plus other important en)72 363 R .162(vironment v)-.36 F
(ariables.)-.225 E F0(.zshenv)4.662 E F1 .161
(should not contain commands that produce output or assume)2.411 F .634
(the shell is attached to a tty)72 374 R(.)-.585 E F0(.zshrc)5.135 E F1
.635(is sourced in interacti)2.885 F .905 -.135(ve s)-.225 H 2.885
(hells. It).135 F .635
(should contain commands to set up aliases, functions,)2.885 F .261
(options, k)72 385 R .531 -.135(ey b)-.09 H .261(indings, etc.).135 F F0
(.zlogin)4.761 E F1 .261(is sourced in login shells.)2.511 F .26
(It should contain commands that should be e)4.761 F -.135(xe)-.135 G
.26(cuted only in lo-).135 F .51(gin shells.)72 396 R F0(.zlogout)5.01 E
F1 .51(is sourced when login shells e)2.76 F(xit.)-.135 E F0(.zprofile)
5.01 E F1 .51(is similar to)2.76 F F0(.zlogin)2.76 E F1 2.76(,e)C .511
(xcept that it is sourced before)-2.895 F F0(.zshrc)72 407 Q F1(.)A F0
(.zprofile)5.341 E F1 .841(is meant as an alternati)3.091 F 1.111 -.135
(ve t)-.225 H(o).135 E F0(.zlogin)3.091 E F1 .841(for ksh f)3.091 F .841
(ans; the tw)-.09 F 3.091(oa)-.09 G .841
(re not intended to be used together)-3.091 F 3.09(,a)-.36 G(l-)-3.09 E
.293(though this could certainly be done if desired.)72 418 R F0
(.zlogin)4.794 E F1 .294
(is not the place for alias de\214nitions, options, en)2.544 F .294
(vironment v)-.36 F .294(ariable set-)-.225 F .511
(tings, etc.; as a general rule, it should not change the shell en)72
429 R .511(vironment at all.)-.36 F(Rather)5.011 E 2.761(,i)-.36 G 2.761
(ts)-2.761 G .511(hould be used to set the terminal type)-2.761 F .803
(and run a series of e)72 440 R .803(xternal commands \()-.135 F F0
(fortune)A F1(,)A F0(msgs)3.053 E F1 3.053(,e)C 3.053(tc\). Shell)-3.053
F .803(Functions Shell Functions)3.053 F F2(zsh)3.053 E F1 .803
(also allo)3.053 F .803(ws you to create)-.225 F 1.191(your o)72 451 R
1.191(wn commands by de\214ning shell functions.)-.225 F -.135(Fo)5.691
G 3.44(re).135 G(xample:)-3.575 E F0 5.4(%y)3.44 G 5.4(p\()-5.4 G -10.06
5.4(\){ >)-5.4 H(ypmatch $1 passwd.byname)32.4 E -.9 5.4(>} %y)72 462 T
5.4(pp)-5.4 G 9.9(falstad pfalstad:*:3564:35:Paul)-5.4 F
(John Falstad:/u/pfalstad:/usr/bin/bin/zsh)5.4 E F1 .583
(This function looks up a user in the NIS passw)72 473 R .583(ord map.)
-.09 F(The)5.083 E F0($1)2.833 E F1 -.135(ex)2.833 G .583
(pands to the \214rst ar).135 F .582(gument to)-.162 F F0(yp)2.832 E F1
5.082(.T)C .582(he function could ha)-5.082 F -.135(ve)-.18 G .729
(been equi)72 484 R -.225(va)-.225 G .729
(lently de\214ned in one of the follo).225 F .729(wing w)-.225 F(ays:)
-.09 E F0 5.4(%f)2.979 G(unction yp {)-5.4 E 37.8(>y)5.679 G
(pmatch $1 passwd.byname)-37.8 E -1.8 5.4(>} %f)72 495 T
(unction yp \(\) {)-5.4 E 37.8(>y)14.4 G(pmatch $1 passwd.byname)-37.8 E
-1.8 5.4(>} %f)14.4 H(unction yp \(\) yp-)-5.4 E(match $1 passwd.byname)
72 506 Q F1 .339(Note that aliases are e)5.289 F .34(xpanded when the f\
unction de\214nition is parsed, not when the function is)-.135 F -.135
(exe)72 517 S 4.952(cuted. F).135 F 2.702(or e)-.135 F(xample:)-.135 E
F0 5.4(%a)4.952 G(lias ypmatch=echo)-5.4 E 5.4(%y)7.652 G 5.4(pp)-5.4 G
2.251(falstad pfalstad:*:3564:35:Paul)-5.4 F(John Fal-)5.4 E
(stad:/u/pfalstad:/usr/bin/bin/zsh)72 528 Q F1 .871(Since the alias w)
5.821 F .871(as de\214ned after the function w)-.09 F .871
(as parsed, it has no ef)-.09 F .872(fect on)-.225 F 1.635
(the function')72 539 R 3.885(se)-.495 G -.135(xe)-4.02 G 3.885
(cution. Ho).135 F(we)-.225 E -.135(ve)-.225 G 2.355 -.36(r, i).135 H
3.885(fw).36 G 3.885(ed)-3.885 G 1.634(e\214ne the function ag)-3.885 F
1.634(ain with the alias in place:)-.045 F F0 5.4(%f)3.884 G
(unction yp \(\) { yp-)-5.4 E(match $1 passwd.byname })72 550 Q 5.4(%y)
5.203 G 5.4(pp)-5.4 G -.197(falstad pfalstad)-5.4 F(passwd.byname)5.4 E
F1 .254(it is parsed with the ne)5.204 F 2.504(wa)-.225 G .254
(lias de\214ni-)-2.504 F .114(tion in place.)72 561 R .113
(Therefore, in general you must de\214ne aliases before functions.)4.614
F 1.553 -.72(We c)4.613 H .113(an mak).72 F 2.363(et)-.09 G .113
(he function tak)-2.363 F 2.363(em)-.09 G .113(ultiple ar)-2.363 F
(guments:)-.162 E F0 5.4(%u)72 572 S(nalias ypmatch)-5.4 E 5.4(%y)22.8 G
5.4(p\()-5.4 G 6.6 5.4(\){ >)-5.4 H(for i)32.4 E 37.8(>d)22.8 G 5.4(oy)
-37.8 G(pmatch $i passwd.byname)-5.4 E 37.8(>d)72 583 S 8.4(one >)-37.8
F 13.8(}%)5.4 G(yp pfalstad subbarao sukthnkr)-8.4 E
(pfalstad:*:3564:35:Paul John Fal-)13.8 E 57.6
(stad:/u/pfalstad:/usr/bin/bin/zsh subbarao:*:3338:35:Kartik)72 594 R
(Subbarao:/u/sub-)5.4 E 111.6
(barao:/usr/bin/bin/zsh sukthnkr:*:1267:35:Rahul)72 605 R
(Sukthankar:/u/suk-)5.4 E(thnkr:/usr/bin/bin/tcsh)72 616 Q F1(The)5.429
E F0 .479(for i)2.729 F F1 .48(loops through each of the function')2.729
F 2.73(sa)-.495 G -.162(rg)-2.73 G .48(uments, setting).162 F F0(i)2.73
E F1 .48(equal to each of them)2.73 F 6.111(in turn.)72 627 R 7.551 -.72
(We c)10.611 H 6.111(an also mak).72 F 8.361(et)-.09 G 6.111
(he function do something sensible if no ar)-8.361 F 6.111
(guments are gi)-.162 F -.135(ve)-.225 G(n:).135 E F0 5.4(%y)8.361 G 5.4
(p\()-5.4 G 5.4(\){)-5.4 G 37.8(>i)72 638 S 5.4(f\()-37.8 G 5.4(\($)-5.4
G 5.4(#=)-5.4 G 5.4(=0\))-5.4 G 122.4(\)>)-5.4 G
(then echo usage: yp name ...; fi)-84.6 E 37.8(>f)72 649 S
(or i; do ypmatch $i passwd.byname; done)-37.8 E 8.4 5.4(>} %y)24.6 H
24.6(pu)-5.4 G(sage: yp name ...)-24.6 E 5.4(%y)72 660 S 5.4(pp)-5.4 G
(falstad sukthnkr)-5.4 E(pfalstad:*:3564:35:Paul John Falstad:/u/pfal-)
106.2 E 3.6(stad:/usr/bin/bin/zsh sukthnkr:*:1267:35:Rahul)72 671 R
(Sukthankar:/u/sukthnkr:/usr/bin/bin/tc-)5.4 E -.141(sh $#)72 682 R F1
.309(is the number of ar)2.559 F .309(guments supplied to the function.)
-.162 F .31
(If it is equal to zero, we print a usage message; otherwise, we loop)
4.809 F .022(through the ar)72 693 R .022(guments, and)-.162 F F0
(ypmatch)2.272 E F1 .022(all of them.)2.272 F(Here')4.522 E 2.272(saf)
-.495 G .022(unction that selects a random line from a \214le:)-2.272 F
F0 5.4(%r)2.271 G(andline \(\) {)-5.4 E 37.8(>i)72 704 S
(nteger z=$\(wc -l <$1\))-37.8 E 37.8(>s)19.2 G
(ed -n $[RANDOM % z + 1]p $1)-37.8 E 3 5.4(>} %r)19.2 H(and-)-5.4 E
(line /etc/motd)72 715 Q
(PHOENIX WILL BE DOWN briefly Friday morning, 5/24/91 from 8 AM to)41.4
E 5.4(%r)72 726 S(andline /etc/motd)-5.4 E
(SunOS Release 4.1.1 \(PHOENIX\) #19: Tue May 14 19:03:15 EDT 1991)19.8
E 5.4(%r)72 737 S(andline /etc/motd)-5.4 E 5.4(|P)41.4 G
(lease use the "msgs" command to read announcements.)-5.4 E(Re-)10.8 E
(fer to the)72 748 Q -9.9 4.95(|% e)16.2 H(cho $z)-4.95 E 5.362(%r)72
770 S(andline)-5.362 E F1 .412(has a local v)2.662 F(ariable,)-.225 E F0
(z)2.662 E F1 2.662(,t)C .412
(hat holds the number of lines in the \214le.)-2.662 F F0 .413
($[RANDOM % z + 1])4.913 F F1 -.135(ex)2.663 G .413(pands to a random)
.135 F .399(number between 1 and)72 781 R F0(z)2.648 E F1 4.898(.A)C
2.648(ne)-4.898 G .398(xpression of the form)-2.783 F F0($[)2.648 E F1
(...)A F0(])A F1 -.135(ex)4.898 G .398(pands to the v).135 F .398
(alue of the arithmetic e)-.225 F .398(xpression within the brack-)-.135
F .353(ets, and the)72 792 R F2(RANDOM)2.603 E F1 -.225(va)2.604 G .354
(riable returns a random number each time it is referenced.).225 F F0(%)
4.854 E F1 .354(is the modulus operator)2.604 F 2.604(,a)-.36 G 2.604
(si)-2.604 G 2.604(nC)-2.604 G 4.854(.T)-2.604 G(here-)-4.854 E 0 Cg EP
%%Page: 3 5
%%BeginPageSetup
BP
%%EndPageSetup
/F0 9/Times-Roman@0 SF(fore,)72 11 Q/F1 9/Courier@0 SF .081
(sed -n $[RANDOM%z+1]p)2.331 F F0 .081
(picks a random line from its input, from 1 to)2.331 F F1(z)2.331 E F0
4.581(.F)C .081(unction de\214nitions can be vie)-4.581 F .081
(wed with the)-.225 F F1(functions)72 22 Q F0 -.18(bu)11.992 G(iltin:)
.18 E F1 5.4(%f)11.992 G(unctions randline)-5.4 E(randline \(\) {)14.693
E(integer z=$\(wc -l <$1\))57.893 E(sed -n $[RANDOM % z + 1]p $1)115.2
33 Q 26.64(}%)72 55 S 21.24(functions yp)-21.24 F(\(\) {)5.4 E
(if let $# == 0)69.84 E(then)145.08 E(echo usage: yp name ...)158.4 66 Q
45.563(fi for)106.874 F 50.963(id)5.4 G(o)-50.963 E
(ypmatch $i passwd.byname)158.4 77 Q(done)139.5 E 4.95(}r)72 99 S
(andline \(\) {)-4.95 E(integer z=$\(wc -l <$1\))48.15 E
(sed -n $[RANDOM % z + 1]p $1)48.15 E(})72 121 Q F0(Here')16.154 E
13.454(sa)-.495 G 11.204(nother one:)-13.454 F F1 5.4(%c)13.453 G 5.4
(x\()-5.4 G 5.4(\){c)-5.4 G(hmod +x $* })-5.4 E 5.4(%l)16.153 G 5.4(s-)
-5.4 G 5.4(lf)-5.4 G(oo bar)-5.4 E 5.4(-rw-r--r-- 1)16.153 F(pfal-)5.4 E
32.4(stad 29)72 132 R(May 24 04:38 bar)5.4 E 5.4(-rw-r--r-- 1)46.8 F
32.4(pfalstad 29)5.4 F(May 24 04:38 foo)5.4 E 5.4(%c)72 143 S 5.4(xf)
-5.4 G(oo bar)-5.4 E 5.4(%l)10.2 G 5.4(s-)-5.4 G 5.4(lf)-5.4 G(oo bar)
-5.4 E 5.4(-rwxr-xr-x 1)10.2 F 32.4(pfalstad 29)5.4 F(May 24 04:38 bar)
5.4 E(-rwxr-)10.2 E 5.4(xr-x 1)72 154 R 32.4(pfalstad 29)5.4 F
(May 24 04:38 foo)5.4 E F0 1.781(Note that this could also ha)6.731 F
2.051 -.135(ve b)-.18 H 1.781(een implemented as an alias:).135 F F1 5.4
(%c)72 165 S(hmod 644 foo bar)-5.4 E 5.4(%a)14.4 G(lias cx='chmod +x')
-5.4 E 5.4(%c)14.4 G 5.4(xf)-5.4 G(oo bar)-5.4 E 5.4(%l)14.4 G 5.4(s-)
-5.4 G 5.4(lf)-5.4 G(oo bar)-5.4 E(-rwxr-xr-)14.4 E 10.8(x1)72 176 S
32.4(pfalstad 29)-5.4 F(May 24 04:38 bar)5.4 E 5.4(-rwxr-xr-x 1)154.8 F
(pfal-)5.4 E 32.4(stad 29)72 187 R(May 24 04:38 foo)5.4 E F0 .792
(Instead of de\214ning a lot of functions in your)5.742 F F1(.zshrc)
3.042 E F0 3.042(,a)C .792(ll of which you may not)-3.042 F .354
(use, it is often better to use the)72 198 R F1(autoload)2.605 E F0 -.18
(bu)2.605 G 2.605(iltin. The).18 F .355(idea is, you create a directory\
 where function de\214nitions are stored, de-)2.605 F .123
(clare the names in your)72 209 R F1(.zshrc)2.372 E F0 2.372(,a)C .122
(nd tell the shell where to look for them.)-2.372 F(Whene)4.622 E -.135
(ve)-.225 G 2.372(ry).135 G .122
(ou reference a function, the shell will au-)-2.372 F 1.99
(tomatically load it into memory)72 220 R(.)-.585 E F1 5.4(%m)6.49 G
(kdir /tmp/funs)-5.4 E 5.4(%c)6.941 G(at >/tmp/funs/yp)-5.4 E
(ypmatch $1 passwd.byname)6.941 E 6(^D %)72 231 R(cat >/tmp/funs/cx)5.4
E(chmod +x $*)11.4 E 6(^D %)11.4 F 6(FPATH=/tmp/funs %)5.4 F
(autoload cx yp)5.4 E 5.4(%f)11.4 G(unc-)-5.4 E(tions cx yp)72 242 Q
(undefined cx \(\))6.3 E(undefined yp \(\))6.3 E 5.4(%c)6.3 G
(hmod 755 /tmp/funs/{cx,yp})-5.4 E 5.4(%y)6.3 G 5.4(pe)-5.4 G(gsirer)
-5.4 E(egsirer:*:3214:35:Emin Gun Sirer:/u/egsirer:/bin/sh)72 253 Q 5.4
(%f)6.6 G(unctions yp)-5.4 E(yp \(\) {)6.6 E(yp-)49.8 E
(match $1 passwd.byname)72 264 Q(})5.199 E F0 .249
(This idea has other bene\214ts.)5.199 F .249(By adding a)4.749 F F1(#!)
2.499 E F0 .249(header to the \214les, you can mak)2.499 F 2.5(et)-.09 G
.25(hem double)-2.5 F .151(as shell scripts.)72 275 R .15
(\(Although it is f)4.651 F .15(aster to use them as functions, since a\
 separate process is not created.\))-.09 F F1 5.4(%e)4.65 G 5.4(d/)-5.4
G(tmp/funs/yp)-5.4 E 1.8(25 i #!)72 286 R 1.8(/usr/bin/zsh w 42 q %)5.4
F 1.8(</tmp/funs/yp #!)5.4 F 1.8(/usr/bin/zsh ypmatch)5.4 F
($1 passwd.byname)5.4 E 5.4(%/)72 297 S(tmp/funs/yp sukthnkr)-5.4 E
(sukthnkr:*:1267:35:Rahul Sukthankar:/u/suk-)111.6 E
(thnkr:/usr/bin/bin/tcsh)72 308 Q F0(No)4.966 E 2.266(wo)-.225 G .016
(ther people, who may not use)-2.266 F/F2 9/Times-Bold@0 SF(zsh)2.266 E
F0 2.266(,o)C 2.266(rw)-2.266 G .016(ho don')-2.266 F 2.266(tw)-.162 G
.016(ant to cop)-2.356 F 2.266(ya)-.09 G .016(ll of your)-2.266 F F1
(.zshrc)2.267 E F0 2.267(,m)C(ay)-2.267 E .335
(use these functions as shell scripts.)72 319 R .335
(Directories Directories One nice feature of)4.835 F F2(zsh)2.585 E F0
.335(is the w)2.585 F .334(ay it prints directories.)-.09 F -.135(Fo)
4.834 G 2.584(re).135 G(xample,)-2.719 E .263(if we set the prompt lik)
72 330 R 2.513(et)-.09 G(his:)-2.513 E F1(phoenix% PROMPT='%~> ')2.513 E
(~> cd src)5.213 E(~/src>)5.213 E F0 .264
(the shell will print the current directory)5.213 F .333
(in the prompt, using the)72 341 R F1(~)2.583 E F0(character)2.583 E
4.833(.H)-.495 G -.225(ow)-4.833 G -1.935 -.225(ev e).225 H -.36(r,).225
G F2(zsh)2.943 E F0 .332
(is smarter than most other shells in this respect:)2.583 F F1
(~/src> cd ~subbarao)2.582 E(~subbarao> cd ~maruchck)72 352 Q
(~maruchck> cd lib)69.3 E(~maruchck/lib> cd fun)69.3 E
(~maruchck/lib/fun> foo=/usr/bin/common/src)72 363 Q
(~maruchck/lib/fun> cd ~foo)20.7 E(~foo> cd ..)20.7 E
(/usr/bin/common> cd src)72 374 Q(~foo> cd news/nntp)6.6 E
(~foo/news/nntp> cd inews)6.6 E(~foo/news/nntp/in-)6.6 E(ews>)72 385 Q
F0 .181(Note that)5.131 F F2(zsh)2.431 E F0(prints)2.431 E/F3 9
/Times-Italic@0 SF(other)2.431 E F0 .181(users' directories in the form)
2.431 F F1(~user)2.431 E F0 4.681(.A)C .18
(lso note that you can set a parameter and use it as a di-)-4.681 F .117
(rectory name;)72 396 R F2(zsh)2.368 E F0 .118(will act as if)2.368 F F1
(foo)2.368 E F0 .118(is a user with the login directory)2.368 F F1
(/usr/bin/common/src)2.368 E F0 4.618(.T)C .118(his is con)-4.618 F
-.135(ve)-.36 G .118(nient, especially).135 F 12.757(if you')72 407 R
12.756(re sick of seeing prompts lik)-.45 F 15.006(et)-.09 G(his:)
-15.006 E F1(phoenix:/usr/bin/common/src/X.V11R4/con-)15.006 E
(trib/clients/xv/docs>)72 418 Q F0 1.549
(If you get stuck in this position, you can gi)6.499 F 1.819 -.135(ve t)
-.225 H 1.549(he current directory a short name, lik).135 F 3.799(et)
-.09 G(his:)-3.799 E F1(/usr/bin/common/src/news/nntp/inews> inews=$PWD)
72 429 Q(/usr/bin/common/src/news/nntp/in-)36 E(ews> echo ~inews)72 440
Q -.061(/usr/bin/common/src/news/nntp/inews ~inews>)5.339 F F0 .389
(When you reference a directory in the)5.339 F(form)72 451 Q F1(~inews)
2.876 E F0 2.875(,t)C .625(he shell assumes that you w)-2.875 F .625
(ant the directory displayed in this form; thus simply typing)-.09 F F1
.625(echo ~inews)2.875 F F0(or)2.875 E F1(cd)2.875 E(~inews)72 462 Q F0
6.752(causes the prompt to be shortened.)9.002 F -.99(Yo)11.252 G 9.002
(uc).99 G 6.752(an de\214ne a shell function for this purpose:)-9.002 F
F1(~in-)9.003 E(ews> namedir \(\) { $1=$PWD ;)72 473 Q 5.4(:~)10.8 G
($1 })-5.4 E(~inews> cd /usr/bin/bin)149.4 E(/usr/bin/bin> namedir pbin)
72 484 Q(~pbin> cd /var/spool/mail)15.3 E
(/var/spool/mail> namedir spool)15.3 E(~spool> cd .msgs)72 495 Q
(~spool/.msgs>)4.95 E F0 -.99(Yo)4.95 G 2.25(um).99 G(ay w)-2.25 E
(ant to add this one-line function to your)-.09 E F1(.zshrc)2.25 E F0(.)
A F2(zsh)72 517 Q F0 .072
(can also put the current directory in your title bar)2.322 F 2.322(,i)
-.36 G 2.322(fy)-2.322 G .072(ou are using a windo)-2.322 F .072
(wing system.)-.225 F .072(One w)4.572 F .072(ay to do this is with the)
-.09 F F1(chp-)2.322 E(wd)72 528 Q F0 .154
(function, which is automatically e)2.403 F -.135(xe)-.135 G .154
(cuted by the shell whene).135 F -.135(ve)-.225 G 2.404(ry).135 G .154
(ou change directory)-2.404 F 4.654(.I)-.585 G 2.404(fy)-4.654 G .154
(ou are using xterm, this will w)-2.404 F(ork:)-.09 E F1
(chpwd \(\) { print -Pn '^[]2;%~^G' })72 539 Q F0(The)5.225 E F1(-P)
2.525 E F0 .275(option tells)2.525 F F1(print)2.525 E F0 .274
(to treat its ar)2.525 F .274(guments lik)-.162 F 2.524(eap)-.09 G .274
(rompt string; other)-2.524 F(-)-.18 E .207(wise the)72 550 R F1(%~)
2.457 E F0 -.09(wo)2.457 G .207(uld not be e).09 F 2.457(xpanded. The)
-.135 F F1(-n)2.457 E F0 .207(option suppresses the terminating ne)2.457
F .207(wline, as with)-.225 F F1(echo)2.457 E F0 4.707(.I)C 2.457(fy)
-4.707 G .207(ou are using an IRIS)-2.457 F F1(wsh)72 561 Q F0 2.604(,d)
C 2.604(ot)-2.604 G(his:)-2.604 E F1
(chpwd \(\) { print -Pn '\\2201.y%~\\234' })2.604 E F0(The)5.303 E F1
.353(print -D)2.603 F F0 .353(command has other uses.)2.603 F -.135(Fo)
4.853 G 2.603(re).135 G(xample,)-2.738 E .121(to print the current dire\
ctory to standard output in short form, you can do this:)72 572 R F1 5.4
(%p)2.371 G(rint -D $PWD)-5.4 E(~subbarao/src)5.071 E F0 .121(and to)
5.071 F 23.208(print each component of the path in short form:)72 583 R
F1 5.4(%p)25.458 G(rint -D $path)-5.4 E
(/bin /usr/bin ~locbin ~locbin/X11 ~/bin)72 594 Q F0 1.77
(Directory Stacks Directory Stacks If you use csh, you may kno)6.719 F
(w)-.225 E .374(about directory stacks.)72 605 R(The)4.873 E F1(pushd)
2.623 E F0 .373
(command puts the current directory on the stack, and changes to a ne)
2.623 F 2.623(wd)-.225 G .373(irectory; the)-2.623 F F1(popd)2.623 E F0
4.722(command pops a directory of)72 616 R 6.972(ft)-.225 G 4.722
(he stack and changes to it.)-6.972 F F1(phoenix% cd)9.222 E
(phoenix% PROMPT='Z %~> ')15.072 E 5.4(Z~)72 627 S 5.4(>p)-5.4 G
(ushd /tmp)-5.4 E(/tmp ~)51.6 E 5.4(Z/)51.6 G(tmp> pushd /usr/etc)-5.4 E
(/usr/etc /tmp ~)51.6 E 5.4(Z/)72 638 S(usr/etc> pushd /usr/bin)-5.4 E
(/usr/bin /usr/etc /tmp ~)10.2 E 5.4(Z/)10.2 G(usr/bin> popd)-5.4 E
(/usr/etc /tmp ~)10.2 E 5.4(Z/)72 649 S(usr/etc> popd)-5.4 E(/tmp ~)
5.958 E 5.4(Z/)5.958 G(tmp> pushd /etc)-5.4 E(/etc /tmp ~)5.958 E 5.4
(Z/)5.958 G(etc> popd)-5.4 E(/tmp ~)11.358 E F2(zsh)5.958 E F0 1.998
-.495('s d)D(irectory).495 E 1.034(stack commands w)72 660 R 1.034
(ork similarly)-.09 F 5.534(.O)-.585 G 1.034(ne dif)-5.534 F 1.034
(ference is the w)-.225 F(ay)-.09 E F1(pushd)3.284 E F0 1.034
(is handled if no ar)3.284 F 1.034(guments are gi)-.162 F -.135(ve)-.225
G 3.284(n. As).135 F 1.035(in csh, this e)3.284 F(x-)-.135 E .186
(changes the top tw)72 671 R 2.436(oe)-.09 G .186
(lements of the directory stack:)-2.436 F F1 5.4(Z/)2.435 G(tmp> dirs)
-5.4 E(/tmp ~)5.135 E 5.4(Z/)5.135 G(tmp> pushd)-5.4 E 5.4(~/)5.135 G
(tmp)-5.4 E F0 .185(unless the stack)5.135 F .094(only has one entry:)72
682 R F1 5.4(Z~)2.344 G 5.4(>p)-5.4 G -.356(opd /tmp Z)-5.4 F
(/tmp> dirs)5.4 E -.355(/tmp Z)5.044 F(/tmp> pushd)5.4 E 5.4(~/)5.045 G
-.355(tmp Z)-5.4 F(~>)5.4 E F0 .095(or unless the)5.045 F F3(PUSHD-)
2.345 E -.162(TO)72 693 S(HOME).162 E F0 1.462(option is set:)3.712 F F1
5.4(Z~)3.712 G 5.4(>s)-5.4 G(etopt pushdtohome)-5.4 E 5.4(Z~)6.412 G 5.4
(>p)-5.4 G 1.012(ushd ~)-5.4 F 5.4(~/)5.4 G(tmp)-5.4 E F0 1.462
(As an alternati)6.412 F 1.731 -.135(ve t)-.225 H 3.711(ou).135 G 1.461
(sing directory)-3.711 F 3.029(stacks in this manner)72 704 R 5.279(,w)
-.36 G 5.279(ec)-5.279 G 3.03(an get something lik)-5.279 F 5.28(ea)-.09
G F3(dir)A 3.03(ectory history)-.333 F F0 3.03(by setting a fe)5.28 F
5.28(wm)-.225 G 3.03(ore options and parameters:)-5.28 F F1
(~> DIRSTACKSIZE=8)72 715 Q
(~> setopt autopushd pushdminus pushdsilent pushdtohome)84.6 E
(~> alias dh='dirs -v')72 726 Q(~> cd /tmp)15.75 E(/tmp> cd /usr)15.75 E
(/usr> cd bin)15.75 E(/usr/bin> cd ../pub)15.75 E(/usr/pub> dh)72 737 Q
37.8(0/)10.44 G 5.04(usr/pub 1)-37.8 F 5.04(/usr/bin 2)37.8 F 5.04
(/usr 3)37.8 F 5.04(/tmp 4)37.8 F(~)37.8 E(/usr/pub> cd -3)72 748 Q
(/tmp> dh)8.28 E 37.8(0/)8.28 G 2.88(tmp 1)-37.8 F 2.88(/usr/pub 2)37.8
F 2.88(/usr/bin 3)37.8 F(/usr)37.8 E 37.8(4~)72 759 S(/tmp> ls =2/df)
-31.864 E .536(/usr/bin/df /tmp>)5.936 F(cd -4)5.4 E(~>)5.936 E F0 .986
(Note that)5.936 F F1(=2)3.236 E F0 -.135(ex)3.236 G .986
(panded to the second directory in).135 F .216
(the history list, and that)72 770 R F1 .216(cd -3)2.466 F F0 .216
(recalled the third directory in the list.)2.466 F -.99(Yo)4.716 G 2.467
(um).99 G .217(ay be w)-2.467 F .217
(ondering what all those options do.)-.09 F F3 -.45(AU)4.717 G -.162(TO)
.45 G(-).162 E(PUSHD)72 781 Q F0(made)3.3 E F1(cd)3.3 E F0 1.05(act lik)
3.3 F(e)-.09 E F1(pushd)3.3 E F0 5.55(.\()C F1 1.05(alias cd=pushd)-5.55
F F0 1.05(is not suf)3.3 F 1.049(\214cient, for v)-.225 F 1.049
(arious reasons.\))-.225 F F3(PUSHDMINUS)5.549 E F0(sw)3.299 E 1.049
(apped the)-.09 F .475(meaning of)72 792 R F1 .475(cd +1)2.725 F F0(and)
2.725 E F1 .475(cd -1)2.725 F F0 2.725(;w)C 2.725(ew)-2.725 G .475
(ant them to mean the opposite of what the)-2.815 F 2.725(ym)-.135 G
.475(ean in csh, because it mak)-2.725 F .476(es more sense in)-.09 F 0
Cg EP
%%Page: 4 6
%%BeginPageSetup
BP
%%EndPageSetup
/F0 9/Times-Roman@0 SF .638(this scheme, and it')72 11 R 2.888(se)-.495
G .637(asier to type:)-2.888 F/F1 9/Courier@0 SF(~> dh)2.887 E 37.8(0~)
5.587 G 37.8(1/)-32.213 G .187(tmp 2)-37.8 F .187(/usr/pub 3)37.8 F
(/usr/bin)37.8 E 37.8(4/)72 22 S 11.52(usr ~>)-37.8 F
(unsetopt pushdminus)5.4 E(~> cd +1)16.92 E(/tmp> dh)16.92 E 37.8(0/)
16.92 G 11.52(tmp 1)-37.8 F(~)37.8 E 37.8(2/)72 33 S .015(usr/pub 3)
-37.8 F .014(/usr/bin 4)37.8 F .014(/usr /tmp>)37.8 F(cd +2)5.4 E
(/usr/pub>)5.414 E/F2 9/Times-Italic@0 SF(PUSHDSILENT)5.414 E F0 -.09
(ke)2.714 G .464(eps the).09 F .055
(shell from printing the directory stack each time we do a)72 44 R F1
(cd)2.305 E F0 2.305(,a)C(nd)-2.305 E F2(PUSHDT)2.305 E(OHOME)-.162 E F0
.055(we mentioned earlier:)2.305 F F1(/usr/pub> unse-)2.306 E
(topt pushdsilent)72 55 Q(/usr/pub> cd /etc)21 E
(/etc /usr/pub /tmp ~ /usr/bin /usr)21 E(/etc> cd)21 E 5.4(~/)72 66 S
(etc /usr/pub /tmp ~ /usr/bin /usr)-5.4 E(~> unsetopt pushdtohome)61.2 E
(~> cd)61.2 E(/etc ~ /usr/pub /tmp ~ /usr/bin /usr)72 77 Q(/etc>)6.934 E
/F3 9/Times-Bold@0 SF(DIRST)6.934 E -.495(AC)-.81 G(KSIZE).495 E F0 -.09
(ke)4.234 G 1.984(eps the directory stack from getting too).09 F(lar)72
88 Q .718(ge, much lik)-.162 F(e)-.09 E F2(HISTSIZE)2.968 E F0(:)A F1
(/etc> setopt pushdsilent)2.968 E(/etc> cd /)5.668 E(/> cd /)5.668 E
(/> cd /)5.668 E(/> cd /)5.668 E(/> cd /)5.668 E(/> cd /)72 99 Q
(/> cd /)10.575 E(/> cd /)10.575 E(/> dh)10.575 E 37.8(0/)10.575 G 37.8
(1/)-27.225 G 37.8(2/)-27.225 G 37.8(3/)-27.225 G 37.8(4/)-27.225 G 37.8
(5/)72 110 S 37.8(6/)-32.155 G 37.8(7/)-32.155 G F0 .695(Command/Proces\
s Substitution Command/Process Substitution Command substitu-)-32.155 F
.558(tion in)72 121 R F3(zsh)2.808 E F0 .557(can tak)2.808 F 2.807(et)
-.09 G .737 -.09(wo f)-2.807 H 2.807(orms. In).09 F .557
(the traditional form, a command enclosed in backquotes \()2.807 F F1(`)
A F0(...)A F1(`)A F0 2.807(\)i)C 2.807(sr)-2.807 G .557
(eplaced on the command)-2.807 F .649(line with its output.)72 132 R
.649(This is the form used by the older shells.)5.149 F(Ne)5.149 E .649
(wer shells \(lik)-.225 F(e)-.09 E F3(zsh)2.899 E F0 2.899(\)a)C .65
(lso pro)-2.899 F .65(vide another form,)-.135 F F1($\()2.9 E F0(...)A
F1(\))A F0 5.15(.T)C(his)-5.15 E 27.381(form is much easier to nest.)72
143 R F1 5.4(%l)31.88 G 5.4(s-)-5.4 G 5.4(l`)-5.4 G(echo /vmunix`)-5.4 E
(-rwxr-xr-)32.33 E 10.8(x1)72 154 S 27(root 1209702)-5.4 F
(May 14 19:04 /vmunix)5.4 E 5.4(%l)31.5 G 5.4(s-)-5.4 G 5.4(l$)-5.4 G
(\(echo /vmunix\))-5.4 E(-rwxr-xr-)31.5 E 10.8(x1)72 165 S 27
(root 1209702)-5.4 F(May 14 19:04 /vmunix)5.4 E 5.4(%w)63.9 G
(ho | grep mad)-5.4 E(sub-)63.9 E(barao ttyt7)72 176 Q(May 23 15:02)16.2
E 181.8(\(mad55sx15.Prince\) pfal-)16.2 F(stad ttyu1)72 187 Q
(May 23 16:25)16.2 E 192.6(\(mad55sx14.Prince\) sub-)16.2 F(barao ttyu6)
72 198 Q(May 23 15:04)16.2 E 181.8(\(mad55sx15.Prince\) pfal-)16.2 F
(stad ttyv3)72 209 Q(May 23 16:25)16.2 E 25.2(\(mad55sx14.Prince\) %)
16.2 F(who | grep mad | awk '{print $2}')5.4 E 19.08
(ttyt7 ttyu1 ttyu6 ttyv3 %)72 220 R(cd /dev; ls -l $\(who |)5.4 E 5.4
(>g)24.48 G(rep $\(echo mad\) |)-5.4 E 5.4(>a)72 231 S
(wk '{ print $2 }'\))-5.4 E 5.4(crwx-w---- 1)84.6 F 5.4(subbarao 20, 71)
5.4 F(May 23 18:35 ttyt7)5.4 E 5.4(crw--w---- 1)72 242 R 5.4
(pfalstad 20, 81)5.4 F(May 23 18:42 ttyu1)5.4 E 5.4(crwx-w---- 1)100.8 F
(sub-)5.4 E 5.4(barao 20, 86)72 253 R(May 23 18:38 ttyu6)5.4 E 5.4
(crw--w---- 1)19.8 F 5.4(pfalstad 20, 99)5.4 F(May 23 18:41 ttyv3)5.4 E
F0(Man)72 264 Q 2.708(yc)-.135 G .458
(ommon uses of command substitution, ho)-2.708 F(we)-.225 E -.135(ve)
-.225 G 1.178 -.36(r, a).135 H .459
(re superseded by other mechanisms of).36 F F3(zsh)2.709 E F0(:)A F1 5.4
(%l)2.709 G 5.4(s-)-5.4 G 5.4(l`)-5.4 G .009(tty` crw-)-5.4 F 5.4
(rw-rw- 1)72 275 R 27(root 20,)5.4 F(28 May 23 18:35 /dev/ttyqc)10.8 E
5.4(%l)45 G 5.4(s-)-5.4 G 5.4(l$)-5.4 G 39.6(TTY crw-rw-)-5.4 F 5.4
(rw- 1)72 286 R 27(root 20,)5.4 F(28 May 23 18:35 /dev/ttyqc)10.8 E 5.4
(%l)31.5 G 5.4(s-)-5.4 G 5.4(l`)-5.4 G(which rn`)-5.4 E(-rwxr-xr-)31.5 E
10.8(x1)72 297 S 32.4(root 172032)-5.4 F 5.4(Mar 6)5.4 F
(18:40 /usr/bin/bin/rn)5.4 E 5.4(%l)42.3 G 5.4(s-)-5.4 G 5.4(l=)-5.4 G
36.9(rn -rwxr-xr-)-5.4 F 10.8(x1)72 308 S 32.4(root 172032)-5.4 F 5.4
(Mar 6)5.4 F(18:40 /usr/bin/bin/rn)5.4 E F0 3.227(Ac)5.927 G .977
(ommand name with a)-3.227 F F1(=)3.227 E F0 .977(prepended is replaced)
3.227 F .324(with its full pathname.)72 319 R .324(This can be v)4.824 F
.324(ery con)-.135 F -.135(ve)-.36 G 2.574(nient. If).135 F(it')2.574 E
2.574(sn)-.495 G .324(ot con)-2.574 F -.135(ve)-.36 G .323
(nient for you, you can turn it of).135 F(f:)-.225 E F1 5.4(%l)2.573 G
5.273(s=)-5.4 G 16.2(foo =bar)-5.273 F 5.4(%l)72 330 S 5.4(s=)-5.4 G
(foo =bar)-5.4 E(zsh: foo not found)6.701 E 5.4(%s)6.701 G
(etopt noequals)-5.4 E 5.4(%l)6.701 G 5.4(s=)-5.4 G(foo =bar)-5.4 E 16.2
(=foo =bar)6.702 F F0(Another)6.702 E 7.373
(nice feature is process substitution:)72 341 R F1 5.4(%w)9.622 G
(ho | fgrep -f =\(print -l root lemke shgchan subbarao\))-5.4 E 21.6
(root console)72 352 R(May 19 10:41)5.4 E 16.2(lemke ttyq0)73.8 F
(May 22 10:05)16.2 E(\(narnia:0.0\))16.2 E 16.2(lemke ttyr7)72 363 R
(May 22 10:05)16.2 E 25.2(\(narnia:0.0\) lemke)16.2 F 10.8(ttyrd May)
21.6 F(22 10:05)5.4 E(\(nar-)16.2 E 58.725(nia:0.0\) shgchan)72 374 R
10.8(ttys1 May)10.8 F(23 16:52)5.4 E 63.675(\(gaudi.Princeton.\) sub-)
16.2 F(barao ttyt7)72 385 Q(May 23 15:02)16.2 E 187.2
(\(mad55sx15.Prince\) sub-)16.2 F(barao ttyu6)72 396 Q(May 23 15:04)16.2
E 9(\(mad55sx15.Prince\) shgchan)16.2 F 10.8(ttyvb May)10.8 F(23 16:51)
5.4 E(\(gau-)16.2 E(di.Princeton.\))72 407 Q F0 3.124(Ac)10.774 G .874
(ommand of the form)-3.124 F F1(=\()3.124 E F0(...)A F1(\))A F0 .873
(is replaced with the name of a)3.124 F F2(\214le)3.123 E F0 .873
(containing its output.)3.123 F .873(\(A command)5.373 F .493
(substitution, on the other hand, is replaced with the output itself.\))
72 418 R F1 .493(print -l)4.993 F F0 .493(is lik)2.743 F(e)-.09 E F1
(echo)2.743 E F0 2.743(,e)C .493(xcepts that it prints its ar)-2.878 F
(guments)-.162 E 4.341(one per line, the w)72 429 R(ay)-.09 E F1(fgrep)
6.591 E F0 -.135(ex)6.591 G 4.34(pects them:).135 F F1 5.4(%p)6.59 G
(rint -l foo bar)-5.4 E 3.89(foo bar)9.29 F F0 5.78 -.72(We c)9.29 H
4.34(ould also ha).72 F 4.61 -.135(ve w)-.18 H(ritten:).135 E F1 5.4(%w)
72 440 S(ho | fgrep -f =\(echo 'root)-5.4 E 5.4(>l)14.611 G 9.211
(emke >)-5.4 F 9.212(shgchan >)5.4 F(subbarao'\))5.4 E F0 2.25
(Using process substitution,)14.612 F 2.25
(you can edit the output of a command:)72 451 R F1 5.4(%e)21.705 G 5.4
(d=)-5.4 G(\(who | fgrep -f ~/.friends\))-5.4 E 19.005(355 g/lemke/d)
24.405 F 5.4(w/)72 462 S 26.55(tmp/filbar 226 q %)-5.4 F
(cat /tmp/filbar)5.4 E 21.6(root console)31.95 F(May 19 10:41)5.4 E 5.4
(shgchan ttys1)72 473 R(May 23 16:52)16.2 E 171
(\(gaudi.Princeton.\) sub-)16.2 F(barao ttyt7)72 484 Q(May 23 15:02)16.2
E 187.2(\(mad55sx15.Prince\) sub-)16.2 F(barao ttyu6)72 495 Q
(May 23 15:04)16.2 E 9(\(mad55sx15.Prince\) shgchan)16.2 F 10.8
(ttyvb May)10.8 F(23 16:51)5.4 E(\(gau-)16.2 E(di.Princeton.\))72 506 Q
F0 13.056(or easily read archi)22.956 F -.135(ve)-.225 G 15.306(dm).135
G(ail:)-15.306 E F1 5.4(%m)15.306 G
(ail -f =\(zcat ~/mail/oldzshmail.Z\))-5.4 E
("/tmp/zsha06024": 84 messages, 0 new, 43 unread)72 517 Q 10.8(>1UT)46.8
G(O: pfalstad, zsh \(10\))-10.8 E 10.8(2Un)88.2 528 S
(ytim!tim@uunet.uu.net, Re: Zsh on Sparc1 /SunOS 4.0.3)-10.8 E 10.8(3UJ)
30.6 G(AM%TPN@utr-)-10.8 E(cgw.utc.com, zsh fix \(15\))72 539 Q 10.8
(4Ud)84.6 G(jm@eng.umd.edu, way to find out if run-)-10.8 E
(ning zsh? \(25\))72 550 Q 10.8(5Ud)52.2 G
(jm@eng.umd.edu, Re: way to find out if running zsh? \(17\))-10.8 E 16.2
(6r)88.2 561 S(djm@eng.umd.edu, Meta . \(18\))-10.8 E 10.8(7Uj)63 G
(ack@cs.glasgow.ac.uk, Re: prob-)-10.8 E(lem building zsh \(147\))72 572
Q 10.8(8Un)25.2 G(ytim!tim@uunet.uu.net, Re: Zsh on Sparc1 /SunOS 4.0.3)
-10.8 E 27(9u)88.2 583 S(rsa!jmd, Another fix... \(61\))-27 E 5.4
(10 U pplace-)187.2 F
(wa@bbn.com, Re: v18i084: Zsh 2.00 - A small complaint \(36\))72 594 Q
5.4(11 U lubkin@cs.rochester.edu,)82.8 605 R(POSIX job control \(34\))
5.4 E 5.4(12 U yale!bron-)73.8 F 63.9(son!tan@uunet.UU.NET 13)72 616 R
10.8(Ub)10.8 G(rett@rpi.edu, zsh \(36\))-10.8 E 5.4(14 S sub-)69.3 F
(barao, zsh sucks!!!! \(286\))72 627 Q 5.4
(15 U snibru!d241s008!d241s013!ala@re-)117 F(lay.EU.net, zsh \(165\))72
638 Q 5.4(16 U nytim!tim@uunet.UU.NET,)25.2 F
(Re: Zsh on Sparc1 /SunOS 4.0.3)5.4 E 5.4(17 U subbarao,)82.8 649 R
(zsh is a junk shell \(43\))5.4 E 5.4(18 U amaranth@vela.acs.oak-)79.2 F
(land.edu, zsh \(33\))72 660 Q(43u/84 1: x)6.94 E 5.4(%l)6.941 G 5.4(s-)
-5.4 G 5.4(l/)-5.4 G 1.541(tmp/zsha06024 /tmp/zsha06024)-5.4 F
(not found)5.4 E F0 1.991(Note that)6.941 F .556(the shell creates a te\
mporary \214le, and deletes it when the command is \214nished.)72 671 R
F1 5.4(%d)5.055 G(iff =\(ls\) =\(ls -F\))-5.4 E .105(3c3 <)5.505 F(for-)
5.4 E .973(tune --- >)72 682 R .973(fortune* 10c10 <)5.4 F .973
(strfile --- >)5.4 F(strfile*)5.4 E F0 1.424(If you read)6.374 F F3(zsh)
3.674 E F0 2.414 -.495('s m)D 1.424(an page, you may notice that).495 F
F1(<\()72 693 Q F0(...)A F1(\))A F0 .511
(is another form of process substitution which is similar to)5.012 F F1
(=\()2.761 E F0(...)A F1(\))A F0 5.011(.T)C .511
(here is an important dif)-5.011 F .511(ference between the tw)-.225 F
2.761(o. In)-.09 F(the)72 704 Q F1(<\()2.505 E F0(...)A F1(\))A F0 .255
(case, the shell creates a named pipe \(FIFO\) instead of a \214le.)
2.505 F .255(This is better)4.755 F 2.505(,s)-.36 G .255
(ince it does not \214ll up the \214le system; b)-2.505 F(ut)-.18 E
1.236(it does not w)72 715 R 1.236(ork in all cases.)-.09 F 1.236(In f)
5.736 F 1.236(act, if we had replaced)-.09 F F1(=\()3.486 E F0(...)A F1
(\))A F0(with)3.486 E F1(<\()3.486 E F0(...)A F1(\))A F0 1.236(in the e)
3.486 F 1.236(xamples abo)-.135 F -.135(ve)-.135 G 3.486(,a).135 G 1.236
(ll of them w)-3.486 F 1.236(ould ha)-.09 F -.135(ve)-.18 G .659
(stopped w)72 726 R .659(orking e)-.09 F .659(xcept for)-.135 F F1 .659
(fgrep -f <\()2.909 F F0(...)A F1(\))A F0 5.16(.Y)C .66
(ou can not edit a pipe, or open it as a mail folder;)-6.15 F F1(fgrep)
2.91 E F0 2.91(,h)C -.225(ow)-2.91 G -1.935 -.225(ev e).225 H 1.38 -.36
(r, h).225 H .66(as no).36 F 1.085(problem with reading a list of w)72
737 R 1.084(ords from a pipe.)-.09 F -.99(Yo)5.584 G 3.334(um).99 G
1.084(ay w)-3.334 F 1.084(onder wh)-.09 F(y)-.045 E F1 1.084
(diff <\(foo\) bar)3.334 F F0(doesn')3.334 E 3.334(tw)-.162 G 1.084
(ork, since)-3.424 F F1 1.084(foo |)3.334 F .072(diff - bar)72 748 R F0
-.09(wo)2.322 G .072(rks; this is because).09 F F1(diff)2.322 E F0 .072
(creates a temporary \214le if it notices that one of its ar)2.322 F
.072(guments is)-.162 F F1(-)2.322 E F0 2.322(,a)C .072
(nd then copies its)-2.322 F .196
(standard input to the temporary \214le.)72 759 R F1(>\()4.696 E F0(...)
A F1(\))A F0 .196(is just lik)2.446 F(e)-.09 E F1(<\()2.446 E F0(...)A
F1(\))A F0 -.135(ex)2.446 G .196
(cept that the command between the parentheses will get its input).135 F
.41(from the named pipe.)72 770 R F1 5.4(%d)4.91 G
(vips -o >\(lpr\) zsh.dvi)-5.4 E F0 .411
(Redirection Redirection Apart from all the re)5.36 F .411
(gular redirections lik)-.135 F(e)-.09 E .128(the Bourne shell has,)72
781 R F3(zsh)2.378 E F0 .128(can do more.)2.378 F -.99(Yo)4.628 G 2.378
(uc).99 G .128(an send the output of a command to more than one \214le,\
 by specifying more redirec-)-2.378 F .253(tions lik)72 792 R(e)-.09 E
F1 5.4(%e)2.503 G(cho Hello World >file1 >file2)-5.4 E F0 .253
(and the te)5.203 F .254(xt will end up in both \214les.)-.135 F
(Similarly)4.754 E 2.504(,y)-.585 G .254(ou can send the out-)-2.504 F 0
Cg EP
%%Page: 5 7
%%BeginPageSetup
BP
%%EndPageSetup
/F0 9/Times-Roman@0 SF .271(put to a \214le and into a pipe:)72 11 R/F1
9/Courier@0 SF 5.4(%m)2.521 G(ake > make.log | grep Error)-5.4 E F0 .271
(The same goes for input.)5.221 F -.99(Yo)4.771 G 2.521(uc).99 G .271
(an mak)-2.521 F 2.521(et)-.09 G .27(he input of a)-2.521 F .885
(command come from more than one \214le.)72 22 R F1 5.4(%s)5.386 G
(ort <file1 <file2 <file3)-5.4 E F0 .886
(The command will \214rst get the contents of)5.836 F 4.624(\214le1 as \
its standard input, then those of \214le2 and \214nally the contents of\
 \214le3.)72 33 R 4.623(This, too, w)9.123 F 4.623(orks with pipes.)-.09
F F1 5.4(%c)72 44 S(ut -d: -f1 /etc/passwd | sort <newnames)-5.4 E F0
.343(The sort will get as its standard input \214rst the output of)5.293
F F1(cut)2.594 E F0(and)2.594 E .138(then the contents of)72 55 R F1
(newnames)2.387 E F0 4.637(.S)C .137(uppose you w)-4.637 F .137
(ould lik)-.09 F 2.387(et)-.09 G 2.387(ow)-2.387 G .137
(atch the standard output of a command on your terminal, b)-2.477 F .137
(ut w)-.18 F(ant)-.09 E 1.178
(to pipe the standard error to another command.)72 66 R 1.178(An easy w)
5.678 F 1.179(ay to do this in)-.09 F/F2 9/Times-Bold@0 SF(zsh)3.429 E
F0 1.179(is by redirecting the standard error using)3.429 F F1(2>)3.429
E(>\()72 77 Q F0(...)A F1(\))A F0(.)A F1 5.4(%f)4.692 G
(ind / -name games 2> >\(grep -v 'Permission' > realerrors\))-5.4 E F0
.192(The abo)5.142 F .462 -.135(ve r)-.135 H .192(edirection will ac-)
.135 F .066(tually be implemented with a re)72 88 R .066
(gular pipe, not a temporary named pipe.)-.135 F .066
(Aliasing Aliasing Often-used commands can be abbre)4.566 F(vi-)-.225 E
.129(ated with an alias:)72 99 R F1 5.4(%a)2.379 G(lias uc=uncompress)
-5.4 E 5.4(%l)5.079 G 5.079(sh)-5.4 G -.321(anoi.Z %)-5.079 F(uc hanoi)
5.4 E 5.4(%l)5.079 G 5.079(sh)-5.4 G(anoi)-5.079 E F0 .128
(or commands with certain)5.079 F 53.75(desired options:)72 110 R F1 5.4
(%a)56 G(lias fm='finger -m')-5.4 E 5.4(%f)58.7 G 5.4(mr)-5.4 G 53.301
(oot Lo-)-5.4 F(gin name: root)72 121 Q(In real life: Operator)129.6 E
(Directo-)100.8 E(ry: /)72 132 Q(Shell: /bin/csh)151.2 E
(On since May 19 10:41:15 on con-)36 E 21.6(sole 3)72 143 R
(days 5 hours Idle Time)5.4 E(No unread mail)4.95 E(No Plan.)4.95 E 5.4
(%a)72 165 S(lias lock='lock -p -60000')-5.4 E 5.4(%l)47.7 G 42.3
(ock lock:)-5.4 F(/dev/ttyr4 on phoenix. time-)5.4 E
(out in 60000 minutes)72 176 Q(time now is Fri May 24 04:23:18 EDT 1991)
4.95 E(Key:)4.95 E 5.4(%a)72 198 S(lias l='ls -AF')-5.4 E 69.3 5.4
(%l/ .)85.5 H 70.2(bash_history kadb*)-5.4 F 102.6(.bashrc lib@)72 209 R
108(.cshrc licensed/)106.2 F 113.4(.exrc lost+found/)72 220 R 108
(.login macsyma)5.037 F F0 1.962(... Aliases)5.038 F .088(can also)2.338
F .539(be used to replace old commands:)72 231 R F1 5.4(%a)2.788 G
(lias grep=egrep ps=sps make=gmake)-5.4 E 5.4(%a)5.488 G
(lias whoami='echo root')-5.4 E 5.4(%w)72 242 S 1.893(hoami root)-5.4 F
F0 2.343(or to de\214ne ne)7.293 F 4.593(wo)-.225 G(nes:)-4.593 E F1 5.4
(%c)4.593 G -8.907 5.4(d/ %a)-5.4 H
(lias sz='ls -l | sort -n +3 | tail -10')-5.4 E 5.4(%s)7.293 G(z)-5.4 E
5.4(drwxr-sr-x 7)72 253 R 48.6(bin 3072)5.4 F(May 23 11:59 etc)5.4 E
(drwxrwxr-)160.2 E(wx 26 root)72 264 Q(5120 May 24 04:20 tmp)48.6 E
(drwxr-xr-)203.4 E 10.8(x2)72 275 S 43.2(root 8192)-5.4 F
(Dec 26 19:34 lost+found)5.4 E(drwxr-sr-)171 E 10.8(x2)72 286 S 43.2
(bin 14848)-5.4 F(May 23 18:48 dev)5.4 E 5.4(-r--r--r-- 1)72 297 R 32.4
(root 140520)5.4 F(Dec 26 20:08 boot)5.4 E(-rwxr-xr-)154.8 E 10.8(x1)72
308 S 32.4(root 311172)-5.4 F(Dec 26 20:08 kadb)5.4 E(-rwxr-xr-)203.4 E
10.8(x1)72 319 S 27(root 1209695)-5.4 F(Apr 16 15:33 vmunix.old)5.4 E
(-rwxr-xr-)171 E 10.8(x1)72 330 S 27(root 1209702)-5.4 F
(May 14 19:04 vmunix)5.4 E(-rwxr-xr-)192.6 E 10.8(x1)72 341 S 27
(root 1209758)-5.4 F(May 21 12:23 vmunix.new.kernelmap.old)5.4 E
(-rwxr-xr-)95.4 E 10.8(x1)72 352 S 27(root 1711848)-5.4 F
(Dec 26 20:08 vmunix.org)5.4 E 5.4(%c)39.6 G 39.6(d%)-5.4 G
(alias rable='ls -AF-)-34.2 E(trd *\(R\)' nrable='ls -AFtrd *\(^R\)')72
363 Q 5.4(%r)246.6 G(able)-5.4 E 27(README func/)72 374 R 37.8
(bin/ pub/ News/)37.8 F 73.8(src/ nicecol-)37.8 F 5.4(ors etc/)72 385 R
37.8(scr/ tmp/ iris/)43.2 F 31.5(zsh* %)37.8 F 31.5(nrable Mailbox-)5.4
F 5.4(es/ mail/)72 396 R(notes)37.8 E F0 .603(\(The pattern)5.553 F F1
(*\(R\))2.853 E F0 .604
(matches all readable \214les in the current directory)2.853 F 2.854(,a)
-.585 G(nd)-2.854 E F1(*\(^R\))2.854 E F0 .604(matches all)2.854 F .189
(unreadable \214les.\))72 407 R .189(Most other shells ha)4.689 F .459
-.135(ve a)-.18 H .189(liases of this kind \().135 F/F3 9/Times-Italic@0
SF(command)A F0 2.439(aliases\). Ho)2.439 F(we)-.225 E -.135(ve)-.225 G
-.36(r,).135 G F2(zsh)2.799 E F0 .189(also has)2.439 F F3(global)2.439 E
F0 .189(aliases, which are)2.439 F 3.063(substituted an)72 418 R 3.063
(ywhere on a line.)-.135 F 3.063(Global aliases can be used to abbre)
7.563 F 3.063(viate frequently-typed usernames, hostnames, etc.)-.225 F
F1 5.4(%a)72 429 S(lias -g me=pfalstad gun=egsirer mjm=maruchck)-5.4 E
5.4(%w)53.1 G(ho | grep me)-5.4 E(pfal-)53.1 E(stad ttyp0)72 440 Q
(May 24 03:39)16.2 E 9(\(mickey.Princeton\) pfalstad)16.2 F 10.8
(ttyp5 May)5.4 F(24 03:42)5.4 E(\(mick-)16.2 E 47.7(ey.Princeton\) %)72
451 R(fm gun)5.4 E(Login name: egsirer)53.1 E(In re-)113.4 E
(al life: Emin Gun Sirer)72 462 Q(Directory: /u/egsirer)52.2 E
(Shell: /bin/sh)102.6 E
(Last login Thu May 23 19:05 on ttyq3 from bow.Princeton.ED)72 473 Q
(New mail re-)90 E(ceived Fri May 24 02:30:28 1991;)72 484 Q
(unread since Fri May 24 02:30:27 1991)95.4 E 5.4(%a)72 495 S
(lias -g phx=phoenix.princeton.edu warc=wuarchive.wustl.edu)-5.4 E 5.4
(%f)20.7 G(tp warc)-5.4 E(Connect-)20.7 E(ed to wuarchive.wustl.edu.)72
506 Q F0 30.789(Here are some more interesting uses.)40.689 F F1 5.4(%a)
72 517 S(lias -g M='| more' GF='| fgrep -f ~/.friends')-5.4 E 5.4(%w)
90.504 G(ho M)-5.4 E(#)16.2 E F3 2.25(pipes the out-)5.4 F 2.25(put of)
72 528 R F1(who)4.5 E F3(thr)4.5 E(ough)-.405 E F1 3.69(more %)4.5 F
(who GF)5.4 E(#)10.8 E F3 2.25(see if your friends ar)5.4 F 4.5(eo)-.333
G(n)-4.5 E F1 5.4(%wG)9.09 G 21.6(F#)-5.4 G F3 2.25
(see what your friends ar)-16.2 F 4.5(ed)-.333 G(o-)-4.5 E(ing)72 539 Q
F0 2.985(Another e)5.047 F 2.985(xample mak)-.135 F 2.985(es use of)-.09
F F2(zsh)5.235 E F0 3.975 -.495('s p)D 2.984(rocess substitution.).495 F
2.984(If you run NIS, and you miss being able to do this:)7.484 F F1 5.4
(%g)72 550 S(rep pfalstad /etc/passwd)-5.4 E F0 2.164
(you can de\214ne an alias that will seem more natural than)7.114 F F1
2.165(ypmatch pfalstad)4.415 F(passwd)72 561 Q F0(:)A F1 5.4(%a)38.166 G
(lias -g PASS='<\(ypcat passwd\)')-5.4 E 5.4(%g)40.866 G
(rep pfalstad PASS)-5.4 E(pfal-)40.866 E
(stad:*:3564:35:Paul John Falstad:/u/pfalstad:/usr/bin/bin/zsh)72 572 Q
F0 .978(If you')5.928 F .978(re really crazy)-.45 F 3.229(,y)-.585 G
.979(ou can e)-3.229 F -.135(ve)-.225 G(n).135 E 3.65(call it)72 583 R
F1(/etc/passwd)5.9 E F0(:)A F1 5.4(%a)5.899 G
(lias -g /etc/passwd='<\(ypcat passwd\)')-5.4 E 5.4(%g)8.599 G
(rep pfalstad /etc/passwd)-5.4 E
(pfalstad:*:3564:35:Paul John Falstad:/u/pfalstad:/usr/bin/bin/zsh)72
594 Q F0 .196(The last e)5.146 F .197(xample sho)-.135 F .197(ws one of)
-.225 F .734(the perils of global aliases; the)72 605 R 2.984(yh)-.135 G
-2.025 -.18(av e)-2.984 H 2.984(al)3.164 G .734
(ot of potential to cause confusion.)-2.984 F -.135(Fo)5.234 G 2.984(re)
.135 G .734(xample, if you de\214ned a global alias called)-3.119 F F1
(|)2.984 E F0 .521(\(which is possible\),)72 616 R F2(zsh)2.771 E F0
-.09(wo)2.771 G .521(uld be).09 F .521(gin to act v)-.135 F .521
(ery strangely; e)-.135 F -.135(ve)-.225 G .522(ry pipe symbol w).135 F
.522(ould be replaced with the te)-.09 F .522(xt of your alias.)-.135 F
-.72(To)5.022 G 1.037(some e)72 627 R 1.037
(xtent, global aliases are lik)-.135 F 3.287(em)-.09 G 1.036(acros in C\
; discretion is advised in using them and in choosing names for them.)
-3.287 F(Using)5.536 E .314(names in all caps is not a bad idea, especi\
ally for aliases which introduce shell metasyntax \(lik)72 638 R(e)-.09
E F1(M)2.565 E F0(and)2.565 E F1(GF)2.565 E F0(abo)2.565 E -.135(ve)
-.135 G 2.565(\). Note).135 F(that)2.565 E F2(zsh)2.565 E F0 .396
(aliases are not lik)72 649 R 2.646(ec)-.09 G .396(sh aliases.)-2.646 F
.396(The syntax for de\214ning them is dif)4.896 F .396(ferent, and the)
-.225 F 2.645(yd)-.135 G 2.645(on)-2.645 G .395(ot ha)-2.645 F .665
-.135(ve a)-.18 H -.162(rg).135 G 2.645(uments. All).162 F .395(your f)
2.645 F -.18(avo)-.09 G .395(rite csh).18 F .238
(aliases will probably not w)72 660 R .238(ork under)-.09 F F2(zsh)2.488
E F0 4.738(.F)C .239(or e)-4.873 F .239(xample, if you try:)-.135 F F1
(alias rm mv '\\!* /tmp/wastebasket')2.489 E F0 .239(no aliases)5.189 F
.418(will be de\214ned, b)72 671 R(ut)-.18 E F2(zsh)2.668 E F0 .417
(will not report an error)2.668 F 4.917(.I)-.495 G 2.667(nc)-4.917 G
.417(sh, this line de\214nes an alias that mak)-2.667 F(es)-.09 E F1(rm)
2.667 E F0 .417(safe---\214les that are)2.667 F F1(rm)2.667 E F0 1.317
-.45('d w)D .417(ill be).45 F(mo)72 682 Q -.135(ve)-.135 G 2.339(dt).135
G 2.339(oat)-2.339 G .089
(emporary directory instead of instantly destro)-2.339 F 2.339(yed. In)
-.09 F F2(zsh)2.339 E F0 1.079 -.495('s s)D .089(yntax, ho).495 F(we)
-.225 E -.135(ve)-.225 G .809 -.36(r, t).135 H .089
(his line asks the shell to print an).36 F 2.34(ye)-.135 G(xist-)-2.475
E .705(ing alias de\214nitions for)72 693 R F1(rm)2.955 E F0(,)A F1(mv)
2.955 E F0 2.955(,o)C(r)-2.955 E F1(!* /tmp/wastebasket)2.955 E F0 5.204
(.S)C .704(ince there are none, most lik)-5.204 F(ely)-.09 E 2.954(,t)
-.585 G .704(he shell will not print an)-2.954 F(y-)-.135 E .286
(thing, although)72 704 R F1(alias)2.536 E F0 .287
(will return a nonzero e)2.536 F .287(xit code.)-.135 F .287
(The proper syntax is this:)4.787 F F1(alias rm='mv \\!* /tmp/wastebas-)
2.537 E(ket')72 715 Q F0(Ho)5.29 E(we)-.225 E -.135(ve)-.225 G 1.06 -.36
(r, t).135 H .34(his w).36 F(on')-.09 E 2.589(tw)-.162 G .339
(ork either:)-2.679 F F1 5.4(%r)2.589 G 5.4(mf)-5.4 G -.111(oo.dvi zsh:)
-5.4 F(no matches found: !*)5.4 E F0 .339(While this mak)10.239 F(es)
-.09 E F1(rm)2.589 E F0 .339(safe, it)2.589 F 5.572
(is certainly not what the user intended.)72 726 R(In)10.072 E F2(zsh)
7.822 E F0 7.822(,y)C 5.572(ou must use a shell function for this:)
-7.822 F F1 5.4(%u)7.823 G(nalias rm)-5.4 E 5.4(%r)72 737 S 5.4(m\()-5.4
G 5.4(\){m)-5.4 G 5.4(v$)-5.4 G 5.4(*/)-5.4 G(tmp/wastebasket })-5.4 E
5.4(%r)5.466 G 5.4(mf)-5.4 G .066(oo.dvi %)-5.4 F(ls /tmp/wastebasket)
5.4 E(foo.dvi)5.466 E F0 .516(While this is)5.466 F .641(much cleaner a\
nd easier to read \(I hope you will agree\), it is not csh-compatible.)
72 748 R .642(Therefore, a script to con)5.142 F -.135(ve)-.36 G .642
(rt csh aliases and).135 F -.225(va)72 759 S .576(riables has been pro)
.225 F 2.826(vided. Y)-.135 F .576
(ou should only need to use it once, to con)-.99 F -.135(ve)-.36 G .576
(rt all your csh aliases and parameters to).135 F F2(zsh)2.826 E F0
(format:)2.826 E F1 5.4(%c)72 770 S 7.65(sh csh>)-5.4 F 7.65(alias l)5.4
F(ls -AF)37.8 E 16.2(more less)13.05 F 27(on last)13.05 F
(-2 !:1 ; who | grep !:1)5.4 E(csh> exit)72 781 Q 5.4(%c)30 G
(2z >neat_zsh_aliases)-5.4 E 5.4(%c)30 G(at neat_zsh_aliases)-5.4 E
(alias l='ls -AF')30 E(alias more='less')72 792 Q
(on \(\) { last -2 $1 ; who | grep $1 })5.774 E(...)5.774 E F0 .824
(The \214rst tw)10.724 F 3.074(oa)-.09 G .824(liases were con)-3.074 F
-.135(ve)-.36 G .824(rted to).135 F 0 Cg EP
%%Page: 6 8
%%BeginPageSetup
BP
%%EndPageSetup
/F0 9/Times-Roman@0 SF(re)72 11 Q(gular)-.135 E/F1 9/Times-Bold@0 SF
(zsh)2.263 E F0 .013
(aliases, while the third, since it needed to handle ar)2.263 F .012
(guments, w)-.162 F .012(as con)-.09 F -.135(ve)-.36 G .012
(rted to a function.).135 F/F2 9/Courier@0 SF(c2z)4.512 E F0 .012
(can con)2.262 F -.135(ve)-.36 G .012(rt most alias-).135 F .833(es to)
72 22 R F1(zsh)3.083 E F0 .834(format without an)3.083 F 3.084(yp)-.135
G 3.084(roblems. Ho)-3.084 F(we)-.225 E -.135(ve)-.225 G 1.554 -.36
(r, i).135 H 3.084(fy).36 G(ou')-3.084 E .834
(re using some really arcane csh tricks, or if you ha)-.45 F 1.104 -.135
(ve a)-.18 H 3.084(na).135 G .834(lias with a)-3.084 F .115(name lik)72
33 R(e)-.09 E F2(do)2.365 E F0 .115(\(which is reserv)2.365 F .115
(ed in)-.135 F F1(zsh)2.365 E F0 .115(\), you may ha)B .385 -.135(ve t)
-.18 H 2.365<6f8c>.135 G 2.364(xs)-2.365 G .114
(ome of the aliases by hand.)-2.364 F(The)4.614 E F2(c2z)2.364 E F0 .114
(script checks your csh setup,)2.364 F .728(and produces a list of)72 44
R F1(zsh)2.978 E F0 .728(commands which replicate your aliases and para\
meter settings as closely as possible.)2.978 F -.99(Yo)5.228 G 2.979(uc)
.99 G .729(ould in-)-2.979 F .02
(clude its output in your startup \214le,)72 55 R F2(.zshrc)2.27 E F0
4.52(.H)C .02(istory History There are se)-4.52 F -.135(ve)-.225 G .02
(ral w).135 F .019(ays to manipulate history in)-.09 F F1(zsh)2.269 E F0
4.519(.O)C .019(ne w)-4.519 F .019(ay is to)-.09 F .376(use csh-style)72
66 R F2(!)2.626 E F0(history:)2.626 E F2 5.4(%/)2.626 G
(usr/bin/!:0 !-2*:s/foo/bar/ >>!$)-5.4 E F0 .376(If you don')5.326 F
2.626(tw)-.162 G .377(ant to use this, you can turn it of)-2.716 F 2.627
(fb)-.225 G(y)-2.627 E(typing)72 77 Q F2 .591(setopt nobanghist)2.841 F
F0 5.091(.I)C 2.841(fy)-5.091 G .591(ou are afraid of accidentally e)
-2.841 F -.135(xe)-.135 G .591(cuting the wrong command you can set the)
.135 F/F3 9/Times-Italic@0 SF(HISTVERIFY)2.84 E F0 2.58(option. If)72 88
R .33(this option is set, commands that result from history e)2.58 F
.331(xpansion will not be e)-.135 F -.135(xe)-.135 G .331
(cuted immediately).135 F 2.581(,b)-.585 G .331(ut will be put back)
-2.761 F .135(into the editor b)72 99 R(uf)-.18 E .135
(fer for further consideration.)-.225 F .135(If you')4.635 F .135
(re not f)-.45 F .135(amiliar with)-.09 F F2(!)2.385 E F0(history)2.385
E 2.385(,h)-.585 G .135(ere follo)-2.385 F .135(ws some e)-.225 F 2.385
(xplanation. History)-.135 F(sub-)2.385 E .436(stitutions al)72 110 R
-.09(wa)-.09 G .436(ys start with a).09 F F2(!)2.686 E F0 2.687(,c)C
.437(ommonly called bang.)-2.687 F .437(After the)4.937 F F2(!)2.687 E
F0 .437(comes an \(optional\) designation of which e)2.687 F -.135(ve)
-.225 G .437(nt \(command\)).135 F .62
(to use, then a colon, and then a designation of what w)72 121 R .62
(ord of that command to use.)-.09 F -.135(Fo)5.12 G 2.87(re).135 G
(xample,)-3.005 E F2(!-)2.87 E F3(n)A F0 .619(refers to the command)2.87
F F3(n)2.869 E F0 .079(commands ago.)72 132 R F2 5.4(%l)4.579 G 5.029
(sf)-5.4 G 5.4(oo bar)-5.029 F 5.4(%c)5.029 G 5.4(df)-5.4 G -.371(oo %)
-5.4 F -.371(!-2 ls baz)5.4 F(bam)10.8 E F0 .079(No w)5.029 F .079
(ord designator w)-.09 F .08(as used, which means that the)-.09 F .013
(whole command referred to w)72 143 R .013(as repeated.)-.09 F .013
(Note that the shell will echo the result of the history substitution.)
4.513 F .012(The w)4.512 F .012(ord designator)-.09 F .464
(can, among other things, be a number indicating the ar)72 154 R .465
(gument to use, where)-.162 F F2(0)2.715 E F0 .465(is the command.)2.715
F F2 5.4(%/)4.965 G(usr/bin/ls foo)-5.4 E(foo)5.415 E 5.4(%!)72 165 S
(:0 bar)-5.4 E(/usr/bin/ls bar)5.785 E(bar)5.785 E F0 .835(In this e)
5.785 F .835(xample, no e)-.135 F -.135(ve)-.225 G .835(nt designator w)
.135 F .835(as used, which tells)-.09 F F1(zsh)3.085 E F0 .834
(to use the pre)3.085 F(vious)-.225 E 8.91(command. A)72 176 R F2($)8.91
E F0 6.66(speci\214es the last ar)8.91 F(gument)-.162 E F2 5.4(%m)8.91 G
(kdir /usr/share/emacs/site-lisp/calc)-5.4 E 5.4(%c)11.61 G 5.4(d!)-5.4
G(:$)-5.4 E(cd /usr/share/emacs/site-lisp/calc)72 187 Q F0 .144
(If you use more w)5.094 F .143
(ords of the same command, only the \214rst)-.09 F F2(!)2.393 E F0 .143
(needs an e)4.643 F -.135(ve)-.225 G(nt).135 E(designator)72 198 Q(.)
-.495 E F2 5.4(%m)25.15 G(ake prig >> make.log)-5.4 E
(make: *** No rule to make target `prig'.)25.601 E(Stop.)10.8 E 5.4(%c)
72 209 S 5.4(ds)-5.4 G 1.276(rc %)-5.4 F(!-2:0 prog >> !:$)5.4 E
(make prog >> make.log)6.676 E F0 1.726(This is dif)6.676 F 1.726
(ferent from csh, where a bang with no)-.225 F -1.935 -.225(ev e)72 220
T .605(nt designator al).225 F -.09(wa)-.09 G .605(ys refers to the pre)
.09 F .605(vious command.)-.225 F .605(If you actually lik)5.105 F 2.855
(et)-.09 G .605(his beha)-2.855 F(viour)-.18 E 2.855(,s)-.36 G .605
(et the)-2.855 F F3(CSHJUNKIEHIST)2.856 E(OR)-.162 E(Y)-.162 E F0(op-)
2.856 E(tion.)72 231 Q F2 5.4(%s)4.975 G(etopt cshjunkiehistory)-5.4 E
5.4(%!)5.425 G(-2:0 prog2 >> !:$)-5.4 E(make prog2 >> cshjunkiehistory)
5.425 E F0(Anoth-)5.424 E 6.297(er w)72 242 R 6.297
(ay to use history is to use the)-.09 F F2(fc)8.547 E F0 8.548
(command. F)8.548 F 6.298(or e)-.135 F 6.298
(xample, if you type an erroneous command:)-.135 F F2 5.4(%f)72 253 S
(or i in `cat /etc/clients`)-5.4 E 22.5(do rpu)27.9 F 22.5($i done)5.4 F
(zsh: command not found: rpu)17.1 E(zsh: command not found: rpu)72 264 Q
(zsh: command not found: rpu)6.285 E F0 3.209(... typing)6.285 F F2(fc)
3.585 E F0 1.335(will e)3.585 F -.135(xe)-.135 G 1.336
(cute an editor on this).135 F .208(command, allo)72 275 R .208
(wing you to \214x it.)-.225 F .208(\(The def)4.708 F .208
(ault editor is)-.09 F F2(vi)2.458 E F0 2.458(,b)C 2.458(yt)-2.458 G
.208(he w)-2.458 F(ay)-.09 E 2.458(,n)-.585 G(ot)-2.458 E F2(ed)2.458 E
F0(\).)A F2 5.4(%f)4.708 G 5.158(c4)-5.4 G 5.158(9/)-5.158 G 5.157
(rpu/s//rup/p rup)-5.158 F 5.157($i w)5.4 F 36.36(49 q for)72 286 R 5.4
(ii)5.4 G 5.4(n`)-5.4 G(cat /etc/clients`)-5.4 E 47.16(do rup)52.56 F
47.16($i done)5.4 F 16.2(beam up)115.2 297 R 5.4(2d)10.8 G(ays, 10:17,)
-5.4 E(load average: 0.86, 0.80, 0.50)21.6 E 16.2(bow up)120.6 308 R 5.4
(4d)10.8 G 5.4(ays, 8:41,)-5.4 F(load average: 0.91, 0.80, 0.50)21.6 E
16.2(burn up)115.2 319 R 16.2(17:18, load)54 F
(average: 0.91, 0.80, 0.50)5.4 E 16.2(burst up)109.8 330 R 5.4(9d)10.8 G
5.4(ays, 1:49,)-5.4 F(load average: 0.95, 0.80, 0.50)21.6 E 16.2(tan up)
120.6 341 R 16.2(11:14, load)54 F(average: 0.91, 0.80, 0.50)5.4 E 16.2
(bathe up)109.8 352 R 5.4(3d)10.8 G(ays, 17:49,)-5.4 E
(load average: 1.84, 1.79, 1.50)21.6 E 16.2(bird up)115.2 363 R 5.4(1d)
10.8 G 10.8(ay, 9:13,)-5.4 F(load average: 1.95, 1.82, 1.51)21.6 E(bon-)
79.2 E 16.2(net up)72 374 R 5.4(2d)10.8 G(ays, 21:18,)-5.4 E
(load average: 0.93, 0.80, 0.50)21.6 E F0 2.775(... A)5.851 F -.225(va)
3.152 G .902(riant of the).225 F F2(fc)3.152 E F0 .902(command is)3.152
F F2(r)3.152 E F0(,)A
(which redoes the last command, with optional changes:)72 385 Q F2 5.4
(%e)2.25 G(cho foo)-5.4 E -.45(foo %)4.95 F 4.95(re)5.4 G(cho foo)-4.95
E(foo)4.95 E 5.4(%e)72 407 S(cho foo)-5.4 E .146(foo %)5.546 F 5.4(rf)
5.4 G .146(oo=bar echo)-5.4 F .146(bar bar)5.4 F F0 .595
(Command Line Editing Command Line Editing)5.546 F F1(zsh)2.845 E F0
1.585 -.495('s c)D .595(ommand line).495 F(editor)72 418 Q(,)-.36 E F1
(ZLE)2.299 E F0 2.299(,i)C 2.299(sq)-2.299 G .049(uite po)-2.299 F 2.299
(werful. It)-.225 F .049
(is designed to emulate either emacs or vi; the def)2.299 F .05
(ault is emacs.)-.09 F 1.49 -.72(To s)4.55 H .05
(et the bindings for vi mode,).72 F(type)72 429 Q F2 .82(bindkey -v)3.07
F F0 5.32(.I)C 3.07(fy)-5.32 G(our)-3.07 E F1(EDIT)3.07 E(OR)-.162 E F0
(or)3.07 E F1(VISU)3.07 E(AL)-.54 E F0(en)3.07 E .82(vironment v)-.36 F
.82(ariable is vi,)-.225 F F1(zsh)3.07 E F0 .82
(will use vi emulation by def)3.07 F 3.069(ault. Y)-.09 F .819(ou can)
-.99 F .476(then switch to emacs mode with)72 440 R F2 .476(bindkey -e)
2.726 F F0 4.976(.I)C 2.726(na)-4.976 G .476
(ddition to basic editing, the shell allo)-2.726 F .476
(ws you to recall pre)-.225 F .477(vious lines in the)-.225 F(history)72
451 Q 7.89(.I)-.585 G 5.64(ne)-7.89 G 3.39(macs mode, this is done with)
-5.64 F F3(^P)5.64 E F0 3.39(\(control-P\) or \(on man)5.64 F 5.64(yt)
-.135 G 3.39(erminals\) with the cursor)-5.64 F 3.39(-up k)-.18 F -.135
(ey)-.09 G(:).135 E F2 5.4(%l)5.64 G 5.4(s~)-5.4 G 59.4(-R)72 462 S 27
(EADME file)-59.4 F 37.8(mail pub)43.2 F 79.2(tmp Mailbox-)48.6 F 10.8
(es bin)72 473 R 37.8(func nicecolors)48.6 F 43.2(scr zsh)10.8 F 37.8
(News etc)72 484 R 37.8(iris notes)48.6 F 18.168(src %)37.8 F
(echo foobar)5.4 E 18.168(foobar %)23.568 F F3(^P)5.4 E F2 5.4(%e)72 495
S(cho foobar)-5.4 E F3(^P)A F2 5.4(%l)5.098 G 5.4(s~)-5.4 G(_)-5.4 E F0
(Pressing)5.098 E F3(^P)2.398 E F0 .147(once brings up the pre)2.397 F
.147(vious line \()-.225 F F2 .147(echo foobar)B F0 .147
(\); pressing it ag)B .147(ain brings up the)-.045 F .556
(line before that \()72 506 R F2 .556(ls ~)B F0 2.806(\). The)B .557
(cursor is left at the end of the line, allo)2.806 F .557
(wing you to edit the line if desired before e)-.225 F -.135(xe)-.135 G
.557(cuting it.).135 F(In)5.057 E(man)72 517 Q 3.367(yc)-.135 G(ases,)
-3.367 E F1(ZLE)3.367 E F0 1.117(eliminates the need for the)3.367 F F2
(fc)3.367 E F0 1.116(command, since it is po)3.367 F 1.116
(werful enough to handle e)-.225 F -.135(ve)-.225 G 3.366(nm).135 G
1.116(ultiline commands:)-3.366 F F2 5.4(%f)72 528 S(or i in a b c d e)
-5.4 E 5.4(>d)6.918 G 6.918(o>)-5.4 G(echo $i)-1.518 E 5.4(>d)6.918 G
1.519(one a b c d e %)-5.4 F F3(^P)5.4 E F2 5.4(%f)6.919 G
(or i in a b c d e)-5.4 E(do)17.719 E(echo $i)77.4 539 Q(done_)17.245 E
F0(No)6.445 E 3.745(wy)-.225 G 1.495(ou can just mo)-3.745 F 1.765 -.135
(ve u)-.135 H 3.745(pt).135 G 3.745(ot)-3.745 G 1.494(he part you w)
-3.745 F 1.494(ant to change...)-.09 F F2 5.4(%f)5.994 G(or i in a)-5.4
E .36 LW 467.856 541.25 463.356 541.25 DL 468.756 541.25 464.256 541.25
DL -4.356 5.4(bcde d)474.156 539 T(o)-5.4 E(echo $i)77.4 550 Q(done)
16.415 E F0 .665(change it, and e)5.615 F -.135(xe)-.135 G .665
(cute the ne).135 F 2.915(wc)-.225 G(ommand.)-2.915 E F2 5.4(%f)5.165 G
(or i in f g h i j)-5.4 E 11.016(do echo)11.016 F 11.016($i done)5.4 F
5.022(fghij)72 561 S F0 .072
(Also, you can search the history for a certain command using)B F3
(ESC-P)2.322 E F0 2.322(,t)C .072
(his will look for the last command that start-)-2.322 F .099
(ed with the \(part of the\) w)72 572 R .1(ord at the be)-.09 F .1
(ginning of the current line.)-.135 F(Hitting)4.6 E F3(ESC-P)2.35 E F0
.1(another time gets you the command before that,)2.35 F(etc.)72 583 Q
F2 5.4(%s)6.883 G(et)-5.4 E F3(ESC-P)5.4 E F2 5.4(%s)7.333 G
(etopt autolist)-5.4 E F3(ESC-P)5.4 E F2 5.4(%s)7.333 G
(etopt nocorrect_)-5.4 E F0 2.382(Another w)7.332 F 2.382
(ay is to do an incremental)-.09 F(search, emacs-style:)72 594 Q F2(%)
2.25 E F3(^R)5.4 E F2 5.4(%_)4.95 G(i-search:)-.45 E 5.4(%l)72 616 S(s)
-5.4 E 92.7 618.25 88.2 618.25 DL 93.6 618.25 89.1 618.25 DL -.45
(/usr/bin i-search:)99 616 R(l)5.4 E 5.4(%d)72 638 S(ate > foofile.)-5.4
E 162.9 640.25 158.4 640.25 DL 163.8 640.25 159.3 640.25 DL 5.472(ci)
163.8 638 S(-search: le)-5.472 E F0 .522(Suppose you ha)5.472 F .792
-.135(ve r)-.18 H(etrie).135 E -.135(ve)-.225 G 2.772(da).135 G 2.772
(no)-2.772 G .523(ld history e)-2.772 F -.135(ve)-.225 G .523
(nt in one of these w).135 F .523(ays and w)-.09 F(ould)-.09 E(lik)72
649 Q 2.706(et)-.09 G 2.706(oe)-2.706 G -.135(xe)-2.841 G .456(cute se)
.135 F -.135(ve)-.225 G .456(ral consecuti).135 F .726 -.135(ve o)-.225
H .456(ld commands starting with this one.).135 F F2(^O)4.956 E F0 .456
(will e)2.706 F -.135(xe)-.135 G .456
(cute the current command and then put the).135 F(ne)72 660 Q .244
(xt command from the history into the editor b)-.135 F(uf)-.18 E(fer)
-.225 E 4.744(.T)-.495 G(yping)-5.464 E F2(^O)2.495 E F0(se)2.495 E
-.135(ve)-.225 G .245(ral times will therefore ree).135 F -.135(xe)-.135
G .245(cute se).135 F -.135(ve)-.225 G .245(ral consecuti).135 F .515
-.135(ve c)-.225 H(om-).135 E .769(mands from the history)72 671 R 5.269
(.O)-.585 G 3.019(fc)-5.269 G .769
(ourse, you can edit some of those commands in between.)-3.019 F .768
(In addition to completion \(see belo)5.268 F(w\),)-.225 E F3 -.45(TA)72
682 S(B).45 E F0 .757(performs e)3.007 F .757(xpansion if possible.)
-.135 F F2 5.4(%l)5.258 G 5.4(s*)-5.4 G(.c)-5.4 E F3 -.45(TA)C(B).45 E
F2 5.4(%l)5.708 G 5.4(sf)-5.4 G
(oofile.c fortune.c rnd.c strfile.c unstr.c_)-5.4 E F0 -.135(Fo)72 693 S
13.426(re).135 G 11.176(xample, suppose you ha)-13.561 F 11.446 -.135
(ve a b)-.18 H 11.175(unch of weird \214les in an important directory:)
-.045 F F2 5.4(%l)13.425 G(s)-5.4 E 21.6 5.4(*** ;&%$)82.8 704 T 5.4
(??foo dspfok)-5.4 F(foo.c)43.2 E 32.4(!"foo"! `)82.8 715 R 32.4 5.4
(\\` f)5.4 H 54(oo rrr)-5.4 F F0 -.99(Yo)5.387 G 2.687(uw).99 G .437
(ant to remo)-2.777 F .707 -.135(ve t)-.135 H .437(hem, b).135 F .437
(ut you don')-.18 F 2.687(tw)-.162 G .437(ant to damage)-2.777 F F2
(foo.c)72 726 Q F0 4.711(.H)C .211(ere is one w)-4.711 F .211
(ay to do this:)-.09 F F2 5.4(%r)2.461 G 5.4(m*)-5.4 G F3 -.45(TA)-5.4 G
(B).45 E F2 5.4(%r)5.161 G 5.4(m\\\\\\)-5.4 G(*\\ \\*\\ \\*\\ \\ \\)-5.4
E(\\!\\"foo\\"\\! \\;\\ \\&\\ %\\ \\$')10.8 E F0 .202(When you e)72 737
R(xpand)-.135 E F2(*)2.452 E F0(,)A F1(zsh)2.451 E F0 .201
(inserts the names of all the \214les into the editing b)2.451 F(uf)-.18
E(fer)-.225 E 2.451(,w)-.36 G .201(ith proper shell quoting.)-2.451 F
(No)4.701 E 1.371 -.585(w, j)-.225 H .201(ust mo).585 F .471 -.135(ve b)
-.135 H(ack).135 E .386(and remo)72 748 R -.135(ve)-.135 G F2(foo.c)
2.771 E F0 .386(from the b)2.636 F(uf)-.18 E(fer:)-.225 E F2 5.4(%r)
2.636 G 5.4(m\\\\\\)-5.4 G(*\\ \\*\\ \\*\\ \\ \\)-5.4 E
(\\!\\"foo\\"\\! \\;\\ \\&\\ %\\ \\$')10.8 E F0 .386(and press re-)5.336
F 2.771(turn. Ev)72 759 R .521(erything e)-.135 F(xcept)-.135 E F2
(foo.c)2.771 E F0 .52(will be deleted from the directory)2.771 F 5.02
(.I)-.585 G 2.77(fy)-5.02 G .52(ou do not w)-2.77 F .52
(ant to actually e)-.09 F .52(xpand the current w)-.135 F .52(ord, b)
-.09 F(ut)-.18 E -.09(wo)72 770 S .272(uld lik).09 F 2.522(et)-.09 G
2.522(os)-2.522 G .272(ee what the matches are, type)-2.522 F F2(^Xg)
2.523 E F0(.)A F2 5.4(%r)4.773 G 5.4(mf)-5.4 G(*)-5.4 E F3(^Xg)A F2 16.2
(foo foo.c)5.223 F 5.4(%r)5.223 G 5.4(mf)-5.4 G(*_)-5.4 E F0(Here')5.223
E 2.523(sa)-.495 G .273(nother trick; let')-2.523 F 2.523(ss)-.495 G(ay)
-2.523 E .316(you ha)72 781 R .586 -.135(ve t)-.18 H .316
(yped this command in:).135 F F2 5.4(%g)2.566 G
(cc -o x.out foob.c -g -Wpointer-arith -Wtrigraphs_)-5.4 E F0 .316
(and you for)5.266 F(get)-.162 E .829(which library you w)72 792 R 3.079
(ant. Y)-.09 F .83
(ou need to escape out for a minute and check by typing)-.99 F F2 .83
(ls /usr/lib)3.08 F F0 3.08(,o)C 3.08(rs)-3.08 G .83
(ome other such com-)-3.08 F 0 Cg EP
%%Page: 7 9
%%BeginPageSetup
BP
%%EndPageSetup
/F0 9/Times-Roman@0 SF .546(mand; b)72 11 R .546(ut you don')-.18 F
2.795(tw)-.162 G .545(ant to retype the whole command ag)-2.885 F .545
(ain, and you can')-.045 F 2.795(tp)-.162 G .545(ress return no)-2.795 F
2.795(wb)-.225 G .545(ecause the current command is)-2.795 F 3.247
(incomplete. In)72 22 R/F1 9/Times-Bold@0 SF(zsh)3.247 E F0 3.247(,y)C
.998(ou can put the line on the)-3.247 F/F2 9/Times-Italic@0 SF -.18(bu)
3.248 G -.162(ff).18 G .998(er stac).162 F(k)-.18 E F0 3.248(,u)C(sing)
-3.248 E F2(ESC-Q)3.248 E F0 3.248(,a)C .998
(nd type some other commands.)-3.248 F .998(The ne)5.498 F .998
(xt time a)-.135 F .695(prompt is printed, the)72 33 R/F3 9/Courier@0 SF
(gcc)2.945 E F0 .695(line will be popped of)2.945 F 2.945(ft)-.225 G
.695(he stack and put in the editing b)-2.945 F(uf)-.18 E .695
(fer automatically; you can then enter the)-.225 F .031
(proper library name and press return \(or)72 44 R(,)-.36 E F2(ESC-Q)
2.281 E F0(ag)2.281 E .031
(ain and look for some other libraries whose names you for)-.045 F 2.282
(got\). A)-.162 F .032(similar situ-)2.282 F .173
(ation: what if you for)72 55 R .173
(get the option to gcc that \214nds b)-.162 F .173
(ugs using AI techniques?)-.18 F -.99(Yo)4.673 G 2.423(uc).99 G .173
(ould either use)-2.423 F F2(ESC-Q)2.423 E F0(ag)2.423 E .173
(ain, and type)-.045 F F3(man)2.422 E(gcc)72 66 Q F0 2.695(,o)C 2.695
(ry)-2.695 G .445(ou could press)-2.695 F F2(ESC-H)2.695 E F0 2.695(,w)C
.445(hich essentially does the same thing; it puts the current line on \
the b)-2.695 F(uf)-.18 E .446(fer stack, and e)-.225 F -.135(xe)-.135 G
(cutes).135 E .375(the command)72 77 R F3 .375(run-help gcc)2.625 F F0
2.625(,w)C(here)-2.625 E F3(run-help)2.625 E F0 .375(is an alias for)
2.625 F F3(man)2.625 E F0 4.875(.A)C .375(nother interesting command is)
-4.875 F F2(ESC-A)2.624 E F0 4.874(.T)C .374(his e)-4.874 F -.135(xe)
-.135 G(cutes).135 E .307(the current line, b)72 88 R .307
(ut retains it in the b)-.18 F(uf)-.18 E(fer)-.225 E 2.557(,s)-.36 G
2.557(ot)-2.557 G .307(hat it appears ag)-2.557 F .308(ain when the ne)
-.045 F .308(xt prompt is printed.)-.135 F .308
(Also, the cursor stays in the)4.808 F 1.41(same place.)72 99 R 1.409
(This is useful for e)5.91 F -.135(xe)-.135 G 1.409
(cuting a series of similar commands:).135 F F3 5.4(%c)3.659 G 5.4(cg)
-5.4 G(rok.c -g -lc -lgl -lsun -lmal-)-5.4 E(loc -Bstatic -o b.out)72
110 Q 5.4(%c)46.8 G 5.4(cf)-5.4 G
(ubar.c -g -lc -lgl -lsun -lmalloc -Bstatic -o b.out)-5.4 E 5.4(%c)72
121 S 5.4(cf)-5.4 G
(ooble.c -g -lc -lgl -lsun -lmalloc -Bstatic -o b.out)-5.4 E F0(The)
6.075 E F2(ESC-')3.375 E F0 1.125(command is useful for man-)3.375 F
15.923(aging the shell')72 132 R 18.173(sq)-.495 G 15.923(uoting con)
-18.173 F -.135(ve)-.36 G 18.173(ntions. Let').135 F 18.173(ss)-.495 G
15.923(ay you w)-18.173 F 15.924(ant to print this string:)-.09 F F3
(don't do that; type 'rm -rf \\*', with a \\ before the *.)72 143 Q F0
1.635(All that is necessary is to type it into the)11.536 F 4.348
(editing b)72 154 R(uf)-.18 E(fer:)-.225 E F3 5.4(%d)6.599 G
(on't do that; type 'rm -rf \\*', with a \\ before the *.)-5.4 E F0
(press)14.249 E F2(ESC-')6.599 E F0(\(escape-)6.599 E(quote\):)72 165 Q
F3 5.4(%')2.886 G
(don'\\''t do that; type '\\''rm -rf \\*'\\'', with a \\ before the *.')
-5.4 E F0 .635(then mo)10.536 F .905 -.135(ve t)-.135 H 2.885(ot).135 G
(he)-2.885 E(be)72 176 Q 64.91(ginning and add the)-.135 F F3(echo)67.16
E F0(command.)67.16 E F3 5.4(%e)72 187 S(cho 'don'\\''t do that; type '\
\\''rm -rf \\*'\\'', with a \\ before the *.')-5.4 E
(don't do that; type 'rm -rf \\*', with a \\ before the *.)72 198 Q F0
(Let')10.946 E 3.296(ss)-.495 G 1.046(ay you w)-3.296 F 1.047
(ant to create an alias to do)-.09 F(this)72 209 Q F3(echo)10.156 E F0
10.156(command. This)10.156 F 7.905
(can be done by recalling the line with)10.156 F F2(^P)10.155 E F0 7.905
(and pressing)10.155 F F2(ESC-')10.155 E F0(ag)10.155 E(ain:)-.045 E F3
5.4(%')72 220 S
(echo '\\''don'\\''\\'\\'''\\''t do that; type '\\''\\'\\'''\\''rm -rf)
-5.4 E(\\*'\\''\\'\\'''\\'', with a \\ before the *.'\\''')72 231 Q F0
.429(and then mo)5.379 F .698 -.135(ve t)-.135 H 2.678(ot).135 G .428
(he be)-2.678 F .428(ginning and add the command to cre-)-.135 F 14.421
(ate an alias.)72 242 R F3 5.4(%a)18.921 G(lias zoof='echo '\\''don'\\'\
'\\'\\'''\\''t do that; type '\\''\\'\\'''\\''rm)-5.4 E
(-rf \\*'\\''\\'\\'''\\'', with a \\ before the *.'\\''')72 253 Q 5.4
(%z)176.4 G(oof)-5.4 E
(don't do that; type 'rm -rf \\*', with a \\ before the *.)72 264 Q F0
3.266(If one of these f)13.165 F(anc)-.09 E 5.516(ye)-.135 G 3.266
(ditor commands)-5.516 F .383(changes your command line in a w)72 275 R
.383(ay you did not intend, you can undo changes with)-.09 F F3(^_)2.633
E F0 2.633(,i)C 2.633(fy)-2.633 G .383(ou can get it out of your k)
-2.633 F -.135(ey)-.09 G(board,).135 E(or)72 286 Q F3(^X^U)2.512 E F0
2.512(,o)C 2.512(therwise. Another)-2.512 F .262
(use of the editor is to edit the v)2.512 F .262(alue of v)-.225 F 2.512
(ariables. F)-.225 F .262(or e)-.135 F .262(xample, an easy w)-.135 F
.263(ay to change your path is)-.09 F 25.268(to use the)72 297 R F3
(vared)27.518 E F0(command:)27.517 E F3 5.4(%v)27.517 G(ared PATH)-5.4 E
5.4(>/)30.217 G(u/pfalstad/scr:/u/pfal-)-5.4 E 90
(stad/bin/sun4:/u/maruchck/scr:/u/subbarao/bin:/u/maruc hck/bin:/u/sub-)
72 308 R(barao/scripts:/usr/bin/bin:/usr/ucb:/usr/bin:/bin:/usr/host)72
319 Q(s:/usr/bin/bin/X11:/./usr/lang:/./usr/etc:/./etc)72 330 Q F0 -.99
(Yo)5.527 G 2.827(uc).99 G .577(an no)-2.827 F 2.827(we)-.225 G .578
(dit the path.)-2.827 F .578(When you press return, the)5.078 F .049
(contents of the edit b)72 341 R(uf)-.18 E .048(fer will be assigned to)
-.225 F F1 -.666(PA)2.298 G(TH)-.189 E F0 4.548(.C)C .048
(ompletion Completion Another great)-4.548 F F1(zsh)2.298 E F0 .048
(feature is completion.)2.298 F .048(If you hit)4.548 F F2 -.45(TA)72
352 S(B).45 E F0(,)A F1(zsh)2.25 E F0(will complete all kinds of stuf)
2.25 E 2.25(f. Lik)-.225 F 2.25(ec)-.09 G(ommands or \214lenames:)-2.25
E F3 5.4(%c)2.25 G(omp)-5.4 E F2 -.45(TA)C(B).45 E F3 5.4(%c)4.95 G
(ompress _)-5.4 E 5.4(%l)72 374 S 5.4(sn)-5.4 G(ic)-5.4 E F2 -.45(TA)C
(B).45 E F3 5.4(%l)4.95 G 5.4(sn)-5.4 G(icecolors _)-5.4 E 5.4(%l)72 396
S 5.4(s/)-5.4 G(usr/pr)-5.4 E F2 -.45(TA)C(B).45 E F3 5.4(%l)4.95 G 5.4
(s/)-5.4 G(usr/bin/_)-5.4 E 5.4(%l)72 418 S 5.4(s-)-5.4 G 5.4(l=)-5.4 G
(com)-5.4 E F2 -.45(TA)C(B).45 E F3 5.4(%l)5.067 G 5.4(s-)-5.4 G 5.4(l=)
-5.4 G(compress _)-5.4 E F0 .117
(If the completion is ambiguous, the editor will beep.)5.067 F .117
(If you \214nd this anno)4.617 F(y-)-.09 E .063(ing, you can set the)72
429 R F2(NOLISTBEEP)2.313 E F0 2.313(option. Completion)2.313 F .063
(can e)2.313 F -.135(ve)-.225 G 2.313(nb).135 G 2.313(ed)-2.313 G .063
(one in the middle of w)-2.313 F 2.313(ords. T)-.09 F 2.313(ou)-.72 G
.063(se this, you will ha)-2.313 F .333 -.135(ve t)-.18 H 2.313(os).135
G(et)-2.313 E(the)72 440 Q F2(COMPLETEINW)4.294 E(ORD)-.225 E F0
(option:)4.295 E F3 5.4(%s)4.295 G(etopt completeinword)-5.4 E 5.4(%l)
6.995 G 5.4(s/)-5.4 G(usr/pt)-5.4 E .36 LW 397.753 442.25 393.253 442.25
DL 398.653 442.25 394.153 442.25 DL(on)398.653 440 Q F2 -.45(TA)C(B).45
E F3 5.4(%l)6.995 G 5.4(s/)-5.4 G(usr/princet)-5.4 E 522.9 442.25 518.4
442.25 DL 523.8 442.25 519.3 442.25 DL(on/)523.8 440 Q 5.4(%s)72 451 S
(etopt alwaystoend)-5.4 E 5.4(%l)5.949 G 5.4(s/)-5.4 G(usr/pt)-5.4 E
249.849 453.25 245.349 453.25 DL 250.749 453.25 246.249 453.25 DL(on)
250.749 451 Q F2 -.45(TA)C(B).45 E F3 5.4(%l)5.949 G 5.4(s/)-5.4 G
(usr/bin/_)-5.4 E F0 -.99(Yo)5.949 G 3.249(uc).99 G .999
(an list possible completions by pressing)-3.249 F F2(^D)72 462 Q F0(:)A
F3 5.4(%l)9.94 G 5.4(s/)-5.4 G(vmu)-5.4 E F2 -.45(TA)C 4.5<428a>.45 G
(beep\212)-4.5 E F3 5.4(%l)12.64 G 5.4(s/)-5.4 G 7.241(vmunix_ %)-5.4 F
(ls /vmunix)5.4 E F2(^D)A F3 102.6(vmunix vmu-)12.641 F 86.791
(nix.old vmunix.new.kernelmap.old)72 473 R(vmunix.org)10.8 E F0(Or)5.791
E 3.091(,y)-.36 G .84(ou could just set the)-3.091 F F2 -.45(AU)3.09 G
-.162(TO).45 G(LIST).162 E F0(option:)72 484 Q F3 5.4(%s)27.216 G
(etopt autolist)-5.4 E 5.4(%l)29.916 G 5.4(s/)-5.4 G(vmu)-5.4 E F2 -.45
(TA)C 4.5<428a>.45 G(beep\212)-4.5 E F3 102.6(vmunix vmu-)29.916 F
86.515(nix.old vmunix.new.kernelmap.old)72 495 R .115(vmunix.org %)10.8
F(ls /vmunix_)5.4 E F0 .564(If you lik)5.515 F 2.814(et)-.09 G 2.814(os)
-2.814 G(ee)-2.814 E .073(the types of the \214les in these lists, lik)
72 506 R 2.323(ei)-.09 G(n)-2.323 E F3(ls -F)2.323 E F0 2.323(,y)C .073
(ou can set the)-2.323 F F2(LISTTYPES)2.323 E F0 2.323(option. T)2.323 F
.073(ogether with)-.72 F F2 -.45(AU)2.323 G -.162(TO).45 G(LIST).162 E
F0 .074(you can use)2.324 F F2(LIS-)2.324 E -.45(TA)72 517 S(MBIGUOUS)
.45 E F0 5.827(.T)C 1.327(his will only list the possibilities if there\
 is no unambiguous part to add:)-5.827 F F3 5.4(%s)3.576 G
(etopt listambiguous)-5.4 E 5.4(%l)72 528 S 5.4(s/)-5.4 G(vmu)-5.4 E F2
-.45(TA)C 4.5<428a>.45 G(beep\212)-4.5 E F3 5.4(%l)40.554 G 5.4(s/)-5.4
G(vmunix_)-5.4 E F2 -.45(TA)C 4.5<428a>.45 G(beep\212)-4.5 E F3 102.6
(vmunix vmu-)40.554 F 86.271(nix.old vmunix.new.kernelmap.old)72 539 R
(vmunix.org)10.8 E F0 .321(If you don')5.271 F 2.571(tw)-.162 G .321
(ant se)-2.661 F -.135(ve)-.225 G .321(ral of these list-).135 F .36
(ings to scroll the screen so much, the)72 550 R F2(AL)2.61 E -1.665
-.54(WA Y)-.495 H(SLASTPR).54 E(OMPT)-.36 E F0 .36(option is useful.)
2.61 F .361(If set, you can continue to edit the line you were)4.86 F
.194(editing, with the completion listing appearing beneath it.)72 561 R
.193(Another interesting option is)4.694 F F2(MENUCOMPLETE)2.443 E F0
4.693(.T)C .193(his af)-4.693 F .193(fects the w)-.225 F(ay)-.09 E F2
-.45(TA)72 572 S(B).45 E F0 -.09(wo)4.316 G 4.316(rks. Let').09 F 4.316
(sl)-.495 G 2.067(ook at the)-4.316 F F3(/vmunix)4.317 E F0 -.135(ex)
4.317 G 2.067(ample ag).135 F(ain:)-.045 E F3 5.4(%s)4.317 G
(etopt menucomplete)-5.4 E 5.4(%l)7.017 G 5.4(s/)-5.4 G(vmu)-5.4 E F2
-.45(TA)C(B).45 E F3 5.4(%l)7.017 G 5.4(s/)-5.4 G(vmu-)-5.4 E(nix)72 583
Q F2 -.45(TA)C(B).45 E F3 5.4(%l)5.651 G 5.4(s/)-5.4 G
(vmunix.new.kernelmap.old)-5.4 E F2 -.45(TA)C(B).45 E F3 5.4(%l)5.651 G
5.4(s/)-5.4 G(vmunix.old_)-5.4 E F0 .7(Each time you press)5.65 F F2
-.45(TA)2.95 G(B).45 E F0 2.95(,i)C 2.95(td)-2.95 G .7(isplays the)-2.95
F(ne)72 594 Q .215(xt possible completion.)-.135 F .215(In this w)4.715
F(ay)-.09 E 2.465(,y)-.585 G .215(ou can c)-2.465 F .215
(ycle through the possible completions until you \214nd the one you w)
-.135 F 2.466(ant. The)-.09 F F2 -.45(AU)2.466 G(-).45 E -.162(TO)72 605
S(MENU).162 E F0 .655(option mak)2.905 F .654
(es a nice compromise between this method of completion and the re)-.09
F .654(gular method.)-.135 F .654(If you set this option,)5.154 F
(pressing)72 616 Q F2 -.45(TA)3.094 G(B).45 E F0 .845
(once completes the unambiguous part normally)3.094 F 3.095(,p)-.585 G
.845(ressing the)-3.095 F F2 -.45(TA)3.095 G(B).45 E F0 -.09(ke)3.095 G
3.095(yr)-.045 G .845(epeatedly after an ambiguous completion)-3.095 F
.347(will c)72 627 R .347(ycle through the possible completions.)-.135 F
.347(Another option you could set is)4.847 F F2(RECEXA)2.597 E(CT)-.27 E
F0 2.597(,w)C .347(hich causes e)-2.597 F .346(xact matches to be ac-)
-.135 F 5.37(cepted, e)72 638 R -.135(ve)-.225 G 7.62(ni).135 G 7.62(ft)
-7.62 G 5.37(here are other possible completions:)-7.62 F F3 5.4(%s)
7.621 G(etopt recexact)-5.4 E 5.4(%l)10.321 G 5.4(s/)-5.4 G(vmu)-5.4 E
F2 -.45(TA)C 4.5<428a>.45 G(beep\212)-4.5 E F3(vmu-)10.321 E 102.6
(nix vmunix.old)72 649 R 5.4(vmunix.new.kernelmap.old vmunix.org)95.4 F
5.4(%l)72 660 S 5.4(s/)-5.4 G(vmunix_)-5.4 E F2 -.45(TA)C(B).45 E F3 5.4
(%l)5.448 G 5.4(s/)-5.4 G(vmunix _)-5.4 E F0 1.938 -.72(To f)5.448 H
.499(acilitate the typing of pathnames, a slash will be added whene).63
F -.135(ve)-.225 G 2.749(rad).135 G(irectory)-2.749 E .336
(is completed.)72 671 R .336(Some computers don')4.836 F 2.586(tl)-.162
G(ik)-2.586 E 2.586(et)-.09 G .336
(he spurious slashes at the end of directory names.)-2.586 F .335
(In that case, the)4.836 F F2 -.45(AU)2.585 G -.162(TO).45 G(REMO).162 E
(VES-)-.45 E(LASH)72 682 Q F0 .155(option comes to rescue.)2.405 F .155
(It will remo)4.655 F .425 -.135(ve t)-.135 H .155
(hese slashes when you type a space or return after them.).135 F(The)
4.655 E F2(\214gnor)2.405 E(e)-.333 E F0 -.225(va)2.405 G .156
(riable lists).225 F(suf)72 693 Q<8c78>-.225 E 6.341
(es of \214les to ignore during completion.)-.135 F F3 5.4(%l)10.841 G
5.4(sf)-5.4 G(oo)-5.4 E F2 -.45(TA)C 4.5<428a>.45 G(beep\212)-4.5 E F3
5.4(foofile.c foofile.o)11.291 F 5.4(%f)11.291 G(ig-)-5.4 E
(nore=\( .o \\~ .bak .junk \))72 704 Q 5.4(%l)6.097 G 5.4(sf)-5.4 G(oo)
-5.4 E F2 -.45(TA)C(B).45 E F3 5.4(%l)6.098 G 5.4(sf)-5.4 G(oofile.c _)
-5.4 E F0(Since)6.098 E F3(foofile.o)3.398 E F0 1.148(has a suf)3.398 F
1.148(\214x that is in the)-.225 F F3(fignore)72 715 Q F0 .27
(list, it w)2.52 F .27(as not considered a possible completion of)-.09 F
F3(foo)2.519 E F0 4.769(.U)C .269(sername completion is also supported:)
-4.769 F F3 5.4(%l)2.519 G 5.4(s~)-5.4 G(pfal)-5.4 E F2 -.45(TA)C(B).45
E F3 5.4(%l)72 726 S 5.4(s~)-5.4 G(pfalstad/_)-5.4 E F0 9.579
(and parameter name completion:)14.529 F F3 5.4(%e)11.829 G(cho $ORG)
-5.4 E F2 -.45(TA)C(B).45 E F3 5.4(%e)14.529 G(cho $ORGANIZATION _)-5.4
E 5.4(%e)72 737 S(cho ${ORG)-5.4 E F2 -.45(TA)C(B).45 E F3 5.4(%e)5.316
G(cho ${ORGANIZATION _)-5.4 E F0 .366(Note that in the last e)5.316 F
.365(xample a space is added after the completion as)-.135 F 2.366
(usual. But)72 748 R .116(if you w)2.366 F .116
(ant to add a colon or closing brace, you probably don')-.09 F 2.367(tw)
-.162 G .117(ant this e)-2.457 F .117(xtra space.)-.135 F .117
(Setting the)4.617 F F2 -.45(AU)2.367 G -.162(TO).45 G -.81(PA).162 G
(RAMKEYS).81 E F0 .814(option will automatically remo)72 759 R 1.084
-.135(ve t)-.135 H .813(his space if you type a colon or closing brace \
after such a completion.).135 F .813(There is also option)5.313 F
(completion:)72 770 Q F3 5.4(%s)4.032 G(etopt nocl)-5.4 E F2 -.45(TA)C
(B).45 E F3 5.4(%s)6.732 G(etopt noclobber _)-5.4 E F0 1.782
(and binding completion:)6.732 F F3 5.4(%b)4.032 G(indkey '^X^X' pu)-5.4
E F2 -.45(TA)C(B).45 E F3 5.4(%b)72 781 S(indkey '^X^X' push-line _)-5.4
E F0(The)5.815 E F3(compctl)3.115 E F0 .865
(command is used to control completion of the ar)3.115 F .864
(guments of speci\214c)-.162 F 4.395(commands. F)72 792 R 2.145(or e)
-.135 F 2.145(xample, to specify that certain commands tak)-.135 F 4.395
(eo)-.09 G 2.146(ther commands as ar)-4.395 F 2.146(guments, you use)
-.162 F F3 2.146(compctl -c)4.396 F F0(:)A 0 Cg EP
%%Page: 8 10
%%BeginPageSetup
BP
%%EndPageSetup
/F0 9/Courier@0 SF 5.4(%c)72 11 S(ompctl -c man nohup)-5.4 E 5.4(%m)
6.859 G(an upt)-5.4 E/F1 9/Times-Italic@0 SF -.45(TA)C(B).45 E F0 5.4
(%m)6.859 G(an uptime _)-5.4 E/F2 9/Times-Roman@0 SF 3.349 -.72(To s)
6.859 H 1.909(pecify that a command should complete \214le-).72 F 1.02
(names, you should use)72 22 R F0 1.02(compctl -f)3.27 F F2 5.52(.T)C
1.02(his is the def)-5.52 F 3.271(ault. It)-.09 F 1.021
(can be combined with)3.271 F F0(-c)3.271 E F2 3.271(,a)C 3.271(sw)
-3.271 G(ell.)-3.271 E F0 5.4(%c)5.521 G(ompctl -cf echo)-5.4 E 5.4(%e)
72 33 S(cho upt)-5.4 E F1 -.45(TA)C(B).45 E F0 5.4(%e)4.95 G
(cho uptime _)-5.4 E 5.4(%e)72 55 S(cho fo)-5.4 E F1 -.45(TA)C(B).45 E
F0 5.4(%e)5.549 G(cho foo.c)-5.4 E F2(Similarly)5.549 E 2.849(,u)-.585 G
(se)-2.849 E F0(-o)2.849 E F2 .599(to specify options,)2.849 F F0(-v)
2.849 E F2 .598(to specify v)2.848 F .598(ariables, and)-.225 F F0(-b)
2.848 E F2 .598(to specify bindings.)2.848 F F0 5.4(%c)72 66 S
(ompctl -o setopt unsetopt)-5.4 E 5.4(%c)36.9 G
(ompctl -v typeset vared unset export)-5.4 E 5.4(%c)36.9 G(om-)-5.4 E
(pctl -b bindkey)72 77 Q F2 -.99(Yo)5.013 G 2.313(uc).99 G .063
(an also use)-2.313 F F0(-k)2.312 E F2 .062
(to specify a custom list of k)2.312 F -.135(ey)-.09 G -.09(wo).135 G
.062(rds to use in completion.).09 F .062(After the)4.562 F F0(-k)2.312
E F2 .062(comes either)2.312 F .208
(the name of an array or a literal array to tak)72 88 R 2.458(ec)-.09 G
.208(ompletions from.)-2.458 F F0 5.4(%f)4.708 G
(tphosts=\(ftp.uu.net wuarchive.wustl.edu\))-5.4 E 5.4(%c)72 99 S
(ompctl -k ftphosts ftp)-5.4 E 5.4(%f)4.95 G(tp wu)-5.4 E F1 -.45(TA)C
(B).45 E F0 5.4(%f)4.95 G(tp wuarchive.wustl.edu _)-5.4 E 5.4(%c)72 121
S(ompctl -k '\(cpirazzi subbarao sukthnkr\)' mail finger)-5.4 E 5.4(%f)
12.924 G(inger cp)-5.4 E F1 -.45(TA)C(B).45 E F0 5.4(%f)12.924 G
(inger cpi-)-5.4 E(razzi _)72 132 Q F2 1.479 -.72(To b)4.989 H .039
(etter specify the \214les to complete for a command, use the).72 F F0
(-g)2.29 E F2 .04(option which tak)2.29 F .04(es an)-.09 F 2.29(yg)-.135
G .04(lob pattern as an ar)-2.29 F(gument.)-.162 E 1.431
(Be sure to quote the glob patterns as otherwise the)72 143 R 3.681(yw)
-.135 G 1.431(ill be e)-3.681 F 1.431(xpanded when the)-.135 F F0
(compctl)3.681 E F2 1.431(command is run.)3.681 F F0 5.4(%l)5.931 G
6.381(sl)-5.4 G(et-)-6.381 E 5.4
(ter.tex letter.dvi letter.aux letter.log letter.toc)72 154 R 5.4(%c)
30.6 G(ompctl -g '*.tex' latex)-5.4 E 5.4(%c)72 165 S
(ompctl -g '*.dvi' xdvi dvips)-5.4 E 5.4(%l)10.674 G(atex l)-5.4 E F1
-.45(TA)C(B).45 E F0 5.4(%l)10.674 G(atex letter.tex _)-5.4 E 5.4(%x)
10.674 G(dvi l)-5.4 E F1 -.45(TA)C(B).45 E F0 5.4(%x)10.674 G(d-)-5.4 E
(vi letter.dvi _)72 176 Q F2 .822
(Glob patterns can include quali\214ers within parentheses.)5.772 F
2.262 -.72(To r)5.322 H .822
(mdir only directories and cd to directories).72 F .157
(and symbolic links pointing to them:)72 187 R F0 5.4(%c)2.406 G
(ompctl -g '*\(-/\)' cd)-5.4 E 5.4(%c)5.106 G(ompctl -g '*\(/\)' rmdir)
-5.4 E F2 .156(RCS users lik)5.106 F 2.406(et)-.09 G(o)-2.406 E .518
(run commands on \214les which are not in the current directory)72 198 R
2.768(,b)-.585 G .518(ut in the RCS subdirectory where the)-2.948 F
2.769(ya)-.135 G .519(ll get)-2.769 F F0(,v)2.769 E F2(suf)2.769 E<8c78>
-.225 E 2.769(es. The)-.135 F(y)-.135 E 23.967(might lik)72 209 R 26.217
(et)-.09 G 26.217(ou)-26.217 G(se)-26.217 E F0 5.4(%c)26.217 G
(ompctl -g 'RCS/*\(:t:s/\\,v//\)' co rlog rcs)-5.4 E 5.4(%l)28.917 G 5.4
(sR)-5.4 G(CS)-5.4 E 5.4(builtin.c,v lex.c,v)72 220 R .241
(zle_main.c,v %)32.4 F(rlog bu)5.4 E F1 -.45(TA)C(B).45 E F0 5.4(%r)
5.641 G(log builtin.c _)-5.4 E F2(The)5.641 E F0(:t)2.942 E F2 .692
(modi\214er k)2.942 F(eeps)-.09 E .019
(only the last part of the pathname and the)72 231 R F0(:s/\\,v//)2.269
E F2 .019(will replace an)2.269 F(y)-.135 E F0(,v)2.269 E F2 .019
(by nothing.)2.269 F(The)4.519 E F0(-s)2.269 E F2 .019
(\215ag is similar to)2.269 F F0(-g)2.269 E F2 2.269(,b)C .019
(ut it uses all)-2.449 F -.135(ex)72 242 S 3.037
(pansions, instead of just globbing, lik).135 F 5.287(eb)-.09 G 3.037
(race e)-5.287 F 3.037
(xpansion, parameter substitution and command substitution.)-.135 F F0
5.4(%c)7.538 G(om-)-5.4 E(pctl -s '$\(setopt\)' unsetopt)72 253 Q F2
1.43(will only complete options which are actually set to be ar)6.38 F
1.429(guments to)-.162 F F0(unsetopt)3.679 E F2(.)A .247
(Sometimes a command tak)72 264 R .247(es another command as its ar)-.09
F 2.497(gument. Y)-.162 F .247(ou can tell)-.99 F/F3 9/Times-Bold@0 SF
(zsh)2.498 E F2 .248(to complete commands as the \214rst ar)2.498 F .248
(gument to)-.162 F .484(such a command and then use the completion meth\
od of the second command.)72 275 R(The)4.984 E F0(-l)2.734 E F2 .484
(\215ag with a null-string ar)2.734 F .483(gument is used)-.162 F 7.579
(for this.)72 286 R F0 5.4(%c)12.08 G(ompctl -l '' nohup exec)-5.4 E 5.4
(%n)12.53 G(ohup comp)-5.4 E F1 -.45(TA)C(B).45 E F0 5.4(%n)12.53 G
(ohup compress _)-5.4 E 5.4(%n)12.53 G(ohup com-)-5.4 E(press fil)72 297
Q F1 -.45(TA)C(B).45 E F0 5.4(%n)5.777 G(ohup compress filename _)-5.4 E
F2 .827(Sometimes you w)5.777 F .826(ould lik)-.09 F 3.076(et)-.09 G
3.076(or)-3.076 G .826(un really complicated commands to)-3.076 F .402
(\214nd out what the possible completions are.)72 308 R 1.842 -.72(To d)
4.902 H 2.652(ot).72 G .402(his, you can specify a shell function to be\
 called that will assign the possible)-2.652 F .918(completions to a v)
72 319 R .918(ariable called reply)-.225 F 5.418(.N)-.585 G .918
(ote that this v)-5.418 F .918(ariable must be an array)-.225 F 5.418
(.H)-.585 G(ere')-5.418 E 3.168(sa)-.495 G .918(nother \(much slo)-3.168
F .918(wer\) w)-.225 F .918(ay to get the)-.09 F 1.996(completions for)
72 330 R F0(co)4.246 E F2 1.996(and friends:)4.246 F F0 5.4(%f)4.246 G
(unction getrcs {)-5.4 E 5.4(>r)6.946 G 1.546(eply=\(\) >)-5.4 F
(for i in RCS/*)5.4 E 16.2(>d)6.946 G -3.092 6.946(o> r)-16.2 H(e-)
-6.946 E(ply=\($reply[*] $\(basename $i ,v\)\))72 341 Q 16.2(>d)5.341 G
-.059(one >)-16.2 F -10.682 5.341(}% c)5.4 H
(ompctl -K getrcs co rlog rcs)-5.341 E F2 .39(Some com-)5.34 F .283
(mand ar)72 352 R .283
(guments use a pre\214x that is not a part of the things to complete.)
-.162 F .283(The kill b)4.783 F .284(uiltin command tak)-.18 F .284
(es a signal name after a)-.09 F F0(-)2.534 E F2(.)A 3.75 -.72(To m)72
363 T(ak).72 E 4.56(es)-.09 G 2.309
(uch a pre\214x be ignored in the completion process, you can use the)
-4.56 F F0(-P)4.559 E F2(\215ag.)4.559 E F0 5.4(%c)6.809 G
(ompctl -P - -k sig-)-5.4 E(nals kill)72 374 Q 5.4(%k)5.6 G(ill -H)-5.4
E F1 -.45(TA)C(B).45 E F0 5.4(%k)5.6 G(ill -HUP _)-5.4 E F2 -.63(Te)5.6
G 2.901(Xi).63 G 2.901(su)-2.901 G .651(sually run on \214les ending in)
-2.901 F F0(.tex)2.901 E F2 2.901(,b)C .651(ut also sometimes on other)
-3.081 F 2.699(\214les. It)72 385 R .448(is some)2.698 F .448(what anno)
-.225 F .448(ying to specify that the ar)-.09 F .448(guments of T)-.162
F .448(eX should end in)-.63 F F0(.tex)2.698 E F2 .448
(and then not be able to complete these)2.698 F .491(other \214les.)72
396 R .492(Therefore you can specify things lik)4.991 F 2.742(eC)-.09 G
.492(omplete to \214les ending in)-2.742 F F0(.tex)2.742 E F2 .492(if a)
2.742 F -.225(va)-.18 G .492(ilable, otherwise complete to an).225 F
2.742<798c>-.135 G(le-)-2.742 E 3.01(name.. This)72 407 R .76
(is done with)3.01 F F1(xor)3.01 E F2 .76(ed completion:)B F0 5.4(%c)
3.01 G(ompctl -g '*.tex' + -f tex)-5.4 E F2(The)5.71 E F0(+)3.01 E F2
.76(tells the editor to only tak)3.01 F 3.009(et)-.09 G(he)-3.009 E(ne)
72 418 Q 1.059(xt thing into account if the current one doesn')-.135 F
3.309(tg)-.162 G 1.059(enerate an)-3.309 F 3.309(ym)-.135 G 3.309
(atches. If)-3.309 F 1.059(you ha)3.309 F 1.329 -.135(ve n)-.18 H 1.059
(ot changed the def).135 F 1.059(ault completion, the)-.09 F(abo)72 429
Q .934 -.135(ve ex)-.135 H .664(ample is in f).135 F .664(act equi)-.09
F -.225(va)-.225 G .664(lent to).225 F F0 5.4(%c)2.914 G
(ompctl -g '*.tex' + tex)-5.4 E F2 .664(as a lone)5.614 F F0(+)2.913 E
F2 .663(at the end is equi)2.913 F -.225(va)-.225 G .663
(lent to specifying).225 F .351(the def)72 440 R .351
(ault completion after the)-.09 F F0(+)2.601 E F2 4.851(.T)C .351
(his form of completion is also frequently used if you w)-4.851 F .352
(ant to run some command only on a)-.09 F .236
(certain type of \214les, b)72 451 R .236
(ut not necessarily in the current directory)-.18 F 4.736(.I)-.585 G
2.486(nt)-4.736 G .236(his case you will w)-2.486 F .236
(ant to complete both \214les of this type and)-.09 F 2.627
(directories. Depending)72 462 R .377
(on your preferences you can use either of)2.627 F F0 5.4(%c)2.628 G
(ompctl -g '*.ps' + -g '*\(-/\)' ghostview)-5.4 E 5.4(%c)72 473 S
(ompctl -g '*.ps *\(-/\)' ghostview)-5.4 E F2 .027(where the \214rst on\
e will only complete directories \(and symbolic links point-)4.977 F
.012(ing to directories\) if no postscript \214le matches the already t\
yped part of the ar)72 484 R 2.263(gument. Extended)-.162 F .013
(completion Extended completion)2.263 F .373
(If you play with completion, you will soon notice that you w)72 495 R
.373(ould lik)-.09 F 2.623(et)-.09 G 2.623(os)-2.623 G .373
(pecify what to complete, depending on what \215ags you)-2.623 F(gi)72
506 Q .537 -.135(ve t)-.225 H 2.517(ot).135 G .267
(he command and where you are on the command line.)-2.517 F -.135(Fo)
4.767 G 2.517(re).135 G .267(xample, a command could tak)-2.652 F 2.517
(ea)-.09 G .537 -.135(ny \214)-2.517 H .267(lename ar).135 F .267
(gument after)-.162 F(a)72 517 Q F0(-f)2.913 E F2 .662
(\215ag, a username after a)2.912 F F0(-u)2.912 E F2 .662
(\215ag and an e)2.912 F -.135(xe)-.135 G .662(cutable after a).135 F F0
(-x)2.912 E F2 2.912(\215ag. This)2.912 F .662
(section will introduce you to the w)2.912 F .662(ays to specify)-.09 F
.118(these things.)72 528 R 1.558 -.72(To m)4.618 H(an).72 E 2.369(yp)
-.135 G .119(eople it seems rather dif)-2.369 F .119
(\214cult at \214rst, b)-.225 F .119
(ut taking the trouble to understand it can sa)-.18 F .389 -.135(ve y)
-.18 H .119(ou lots of typing in).135 F .044(the end.)72 539 R(Ev)4.544
E .044(en I k)-.135 F .043(eep being surprised when)-.09 F F3(zsh)2.293
E F2 .043(manages to complete a small or e)2.293 F -.135(ve)-.225 G
2.293(ne).135 G .043(mpty pre\214x to the right \214le in a lar)-2.293 F
.043(ge direc-)-.162 F(tory)72 550 Q 5.232(.T)-.585 G 2.982(ot)-5.952 G
(ell)-2.982 E F3(zsh)2.982 E F2 .732
(about these kinds of completion, you use e)2.982 F .732
(xtended completion by specifying the)-.135 F F0(-x)2.982 E F2 .732
(\215ag to compctl.)2.982 F(The)5.232 E F0(-x)2.982 E F2 .615
(\215ag tak)72 561 R .615(es a list of patterns/\215ags pairs.)-.09 F
.615
(The patterns specify when to complete and the \215ags specify what.)
5.115 F .614(The \215ags are simply)5.114 F .309(those mentioned abo)72
572 R -.135(ve)-.135 G 2.559(,l).135 G(ik)-2.559 E(e)-.09 E F0(-f)2.559
E F2(or)2.559 E F0(-g)2.559 E F1 .309(glob pattern)5.709 F F2 4.81(.A)C
2.56(sa)-4.81 G 2.56(ne)-2.56 G .31(xample, the)-2.695 F F0(r[)2.56 E F1
(string1)A F0(,)A F1(string2)A F0(])A F2 .31
(pattern matches if the cursor is af-)2.56 F .625
(ter something that starts with)72 583 R F1(string1)2.875 E F2 .625
(and before something that starts with)2.875 F F1(string2)2.875 E F2
5.125(.T)C(he)-5.125 E F1(string2)2.875 E F2 .625
(is often something that you do)2.875 F 15.409(not w)72 594 R 15.409
(ant to match an)-.09 F 15.409(ything at all.)-.135 F F0 5.4(%l)19.909 G
20.359(sf)-5.4 G 10.8(oo1 bar1 foo.Z)-20.359 F 14.959(bar.Z %)10.8 F
(com-)5.4 E(pctl -g '^*.Z' -x 'r[-d,---]' -g '*.Z' -- compress)72 605 Q
5.4(%c)12.924 G(ompress f)-5.4 E F1 -.45(TA)C(B).45 E F0 5.4(%c)12.924 G
(ompress foo1 _)-5.4 E 5.4(%c)72 616 S(ompress -d f)-5.4 E F1 -.45(TA)C
(B).45 E F0 5.4(%c)5.836 G(ompress -d foo.Z _)-5.4 E F2 .886(In the abo)
5.836 F 1.157 -.135(ve ex)-.135 H .887
(ample, if the cursor is after the).135 F F0(-d)3.137 E F2 .887
(the pattern will)3.137 F .664(match and therefore)72 627 R F3(zsh)2.914
E F2 .664(uses the)2.914 F F0 .664(-g *.Z)2.914 F F2 .664
(\215ag that will only complete \214les ending in)2.914 F F0(.Z)2.913 E
F2 5.163(.O)C .663(therwise, if no pattern matches, it)-5.163 F .054
(will use the \215ags before the)72 638 R F0(-x)2.304 E F2 .055
(and in this case complete e)2.304 F -.135(ve)-.225 G .055
(ry \214le that does not end in).135 F F0(.Z)2.305 E F2 4.555(.T)C(he)
-4.555 E F0(s[)2.305 E F1(string)A F0(])A F2 .055
(pattern matches if the)2.305 F 5.322(current w)72 649 R 5.322
(ord starts with)-.09 F F1(string)7.572 E F2 9.822(.T)C(he)-9.822 E F1
(string)7.572 E F2 5.321
(itself is not considered to be part of the completion.)7.572 F F0 5.4
(%c)9.821 G(om-)-5.4 E(pctl -x 's[-]' -k signals -- kill)72 660 Q 5.4
(%k)5.776 G(ill -H)-5.4 E F1 -.45(TA)C(B).45 E F0 5.4(%k)5.776 G
(ill -HUP _)-5.4 E F2(The)5.776 E F0(tar)3.076 E F2 .826(command tak)
3.076 F .826(es a tar \214le as)-.09 F .284(an ar)72 671 R .284
(gument after the)-.162 F F0(-f)2.534 E F2 2.534(option. The)2.534 F F0
(c[)2.534 E F1(of)A(fset)-.162 E F0(,)A F1(string)A F0(])A F2 .284
(pattern matches if the w)2.534 F .284(ord in position)-.09 F F1(of)
2.534 E(fset)-.162 E F2(relati)2.534 E .554 -.135(ve t)-.225 H 2.534(ot)
.135 G .284(he current w)-2.534 F(ord)-.09 E(is)72 682 Q F1(string)6.444
E F2 8.694(.M)C 4.194(ore in particular)-8.694 F 6.444(,i)-.36 G(f)
-6.444 E F1(of)6.444 E(fset)-.162 E F2 4.194
(is -1, it matches if the pre)6.444 F 4.195(vious w)-.225 F 4.195
(ord is)-.09 F F1(string)6.445 E F2 8.695(.T)C 4.195(his suggests)-8.695
F F0 5.4(%c)6.445 G(om-)-5.4 E(pctl -f -x 'c[-1,-f]' -g '*.tar' -- tar)
72 693 Q F2 .811(But this is not enough.)5.761 F(The)5.311 E F0(-f)3.061
E F2 .81(option could be the last of a longer)3.061 F 2.081
(string of options.)72 704 R F0(C[)6.581 E F2(...)A F0(,)A F2(...)A F0
(])A F2 2.081(is just lik)4.331 F(e)-.09 E F0(c[)4.331 E F2(...)A F0(,)A
F2(...)A F0(])A F2 4.331(,e)C 2.082(xcept that it uses glob-lik)-4.466 F
4.332(ep)-.09 G 2.082(attern matching for)-4.332 F F1(string)4.332 E F2
6.582(.S)C(o)-6.582 E F0 5.4(%c)4.332 G(om-)-5.4 E
(pctl -f -x 'C[-1,-*f]' -g '*.tar' -- tar)72 715 Q F2 .985
(will complete tar \214les after an)5.935 F 3.234(yo)-.135 G .984
(ption string ending in an)-3.234 F F0(f)3.234 E F2 5.484(.B)C(ut)-5.484
E(we')72 726 Q 2.463(dl)-.45 G(ik)-2.463 E 2.463(ee)-.09 G -.135(ve)
-2.688 G 2.463(nm).135 G 2.463(ore. Old)-2.463 F -.135(ve)2.463 G .213
(rsions of tar used all options as the \214rst ar).135 F .213(gument, b)
-.162 F .213(ut without the minus sign.)-.18 F .214
(This might be incon-)4.714 F .893
(sistent with option usage in all other commands, b)72 737 R .893
(ut it is still supported by ne)-.18 F .892(wer v)-.225 F .892
(ersions of)-.135 F F0(tar)3.142 E F2 5.392(.S)C 3.142(ow)-5.392 G 3.142
(ew)-3.142 G .892(ould also lik)-3.232 F 3.142(et)-.09 G(o)-3.142 E .215
(complete tar \214les if the \214rst ar)72 748 R .215(gument ends in an)
-.162 F F0(f)2.466 E F2 .216(and we')2.466 F .216(re right behind it.)
-.45 F 1.656 -.72(We c)4.716 H .216
(an `and' patterns by putting them ne).72 F .216(xt to each)-.135 F .603
(other with a space between them.)72 759 R 2.043 -.72(We c)5.103 H .603
(an `or' these sets by putting comma').72 F 2.852(sb)-.495 G .602
(etween them.)-2.852 F 2.042 -.72(We w)5.102 H .602
(ill also need some ne).72 F 2.852(wp)-.225 G(at-)-2.852 E(terns.)72 770
Q F0(p[)5.625 E F1(num)A F0(])A F2 1.125(will match if the current ar)
3.375 F 1.126(gument \(the one to be completed\) is the)-.162 F F1(num)
3.376 E F2 1.126(th ar)B(gument.)-.162 E F0(W[)5.626 E F1(inde)A(x)-.18
E F0(,)A F1(pattern)A F0(])A F2(will)3.376 E 13.469(match if the ar)72
781 R 13.468(gument in place)-.162 F F1(inde)15.718 E(x)-.18 E F2 13.468
(matches the)15.718 F F1(pattern)15.718 E F2 17.968(.T)C 13.468(his gi)
-17.968 F -.135(ve)-.225 G 15.718(su).135 G(s)-15.718 E F0 5.4(%c)15.718
G(om-)-5.4 E(pctl -f -x 'C[-1,-*f] , W[1,*f] p[2]' -g '*.tar' -- tar)72
792 Q F2 .895(In w)5.845 F .895(ords: If the pre)-.09 F .895(vious ar)
-.225 F .895(gument is an op-)-.162 F 0 Cg EP
%%Page: 9 11
%%BeginPageSetup
BP
%%EndPageSetup
/F0 9/Times-Roman@0 SF .202(tion string that ends in an)72 11 R/F1 9
/Courier@0 SF(f)2.452 E F0 2.452(,o)C 2.452(rt)-2.452 G .202
(he \214rst ar)-2.452 F .202(gument ended in an)-.162 F F1(f)2.452 E F0
.201(and it is no)2.452 F 2.451(wt)-.225 G .201(he second ar)-2.451 F
.201(gument, then complete only \214lenames)-.162 F .646(ending in)72 22
R F1(.tar)2.896 E F0 5.146(.A)C .646(ll the abo)-5.146 F .916 -.135
(ve ex)-.135 H .646
(amples used only one set of patterns with one completion \215ag.).135 F
-.99(Yo)5.147 G 2.897(uc).99 G .647(an use se)-2.897 F -.135(ve)-.225 G
.647(ral of these).135 F .794(pattern/\215ag pairs separated by a)72 33
R F1(-)3.044 E F0 5.294(.T)C .793
(he \214rst matching pattern will be used.)-5.294 F .793(Suppose you ha)
5.293 F 1.063 -.135(ve a ve)-.18 H .793(rsion of).135 F F1(tar)3.043 E
F0 .793(that supports)3.043 F .243(compressed \214les by using a)72 44 R
F1(-Z)2.493 E F0 2.493(option. Lea)2.493 F .243
(ving the old tar syntax aside for a moment, we w)-.18 F .244(ould lik)
-.09 F 2.494(et)-.09 G 2.494(oc)-2.494 G .244(omplete \214les ending in)
-2.494 F F1(.tar.Z)72 55 Q F0 .718(if a)2.968 F F1(-Z)2.968 E F0 .718
(option has been used and \214les ending in)2.968 F F1(.tar)2.968 E F0
.718(otherwise, all this only after a)2.968 F F1(-f)2.968 E F0 2.968
(\215ag. Ag)2.968 F .717(ain, the)-.045 F F1(-Z)2.967 E F0 .717(can be)
2.967 F .388(alone or it can be part of a longer option string, perhaps\
 the same as that of the)72 66 R F1(-f)2.639 E F0 2.639(\215ag. Here')
2.639 F 2.639(sh)-.495 G .839 -.225(ow t)-2.639 H 2.639(od).225 G 2.639
(oi)-2.639 G .389(t; note the backslash)-2.639 F 13.946
(and the secondary prompt which are not part of the)72 77 R F1(compctl)
16.195 E F0(command.)16.195 E F1 5.4(%c)18.445 G(om-)-5.4 E
(pctl -f -x 'C[-1,-*Z*f] , R[-*Z*,---] C[-1,-*f]' -g '*.tar.Z' - \\)72
88 Q 5.4(>')72 99 S(C[-1,-*f]' -g '*.tar' -- tar)-5.4 E F0 .682
(The \214rst pattern set tells us to match if either the pre)5.633 F
.682(vious ar)-.225 F .682(gument w)-.162 F .682(as an op-)-.09 F .143
(tion string including a)72 110 R F1(Z)2.393 E F0 .143(and ending in an)
2.393 F F1(f)2.393 E F0 .143(or there w)2.393 F .143
(as an option string with a)-.09 F F1(Z)2.393 E F0(some)2.393 E .143
(where and the pre)-.225 F .143(vious w)-.225 F .143(ord w)-.09 F .143
(as an)-.09 F 2.393(yo)-.135 G(p-)-2.393 E .069
(tion string ending in an)72 121 R F1(f)2.318 E F0 4.568(.I)C 2.318(ft)
-4.568 G .068(his is the case, we need a compressed tar \214le.)-2.318 F
.068(Only if this is not the case the second pattern set will)4.568 F
.148(be considered.)72 132 R .148(By the w)4.648 F(ay)-.09 E(,)-.585 E
F1(R[)2.398 E/F2 9/Times-Italic@0 SF(pattern1)A F1(,)A F2(pattern2)A F1
(])A F0 .148(is just lik)2.398 F(e)-.09 E F1(r[)2.398 E F0(...)A F1(,)A
F0(...)A F1(])A F0 -.135(ex)2.399 G .149
(cept that it uses pattern matching with shell metachar).135 F(-)-.18 E
.367(acters instead of just strings.)72 143 R -.99(Yo)4.867 G 2.617(uw)
.99 G .367(ill ha)-2.617 F .637 -.135(ve n)-.18 H .367(oticed the).135 F
F1(--)2.617 E F0 .366(before the command name.)2.617 F .366
(This ends the list of pattern/\215ag pairs of)4.866 F F1(-x)72 154 Q F0
4.823(.I)C 2.573(ti)-4.823 G 2.573(su)-2.573 G .323
(sually used just before the command name, b)-2.573 F .323
(ut you can also use an e)-.18 F .324
(xtended completion as one part of a list of xored)-.135 F
(completions, in which case the)72 165 Q F1(--)2.25 E F0
(appears just before one of the)2.25 E F1(+)2.25 E F0 2.25(signs. Note)
2.25 F(the dif)2.25 E(ference between using e)-.225 E
(xtended completion)-.135 E 17.326
(as part of a list of xored completions as in)72 176 R F1 5.4(%l)19.577
G 22.277(sf)-5.4 G 5.4(oo bar)-22.277 F 5.4(%c)22.277 G(om-)-5.4 E
(pctl -x 'r[-d,---]' -g '*.Z' -- + -g '^*.Z' compress)72 187 Q 5.4(%c)
29.124 G(ompress -d f)-5.4 E F2 -.45(TA)C(B).45 E F1 5.4(%c)29.124 G
(om-)-5.4 E(press -d foo _)72 198 Q F0 21.086
(and specifying something before the)26.036 F F1(-x)23.336 E F0 21.086
(as in)23.336 F F1 5.4(%c)23.336 G(om-)-5.4 E
(pctl -g '^*.Z' -x 'r[-d,---]' -g '*.Z' -- compress)72 209 Q 5.4(%c)
7.524 G(ompress -d f)-5.4 E F2 -.45(TA)C(B).45 E F1 5.4(%c)7.524 G
(ompress -d f_)-5.4 E F0 .02(In the \214rst case, the alternati)72 220 R
.291 -.135(ve g)-.225 H .021(lob pattern \().135 F F1(^*.Z)A F0 2.271
(\)w)C .021(ill be used if the \214rst part does not generate an)-2.271
F 2.271(yp)-.135 G .021(ossible completions, while)-2.271 F .471
(in the second case the alternati)72 231 R .74 -.135(ve g)-.225 H .47
(lob pattern will only be used if the).135 F F1(r[)2.72 E F0(...)A F1(])
A F0 .47(pattern doesn')2.72 F 2.72(tm)-.162 G 2.72(atch. Bindings)-2.72
F .47(Bindings Each of)2.72 F .518(the editor commands we ha)72 242 R
.788 -.135(ve s)-.18 H .518(een w).135 F .518
(as actually a function bound by def)-.09 F .518(ault to a certain k)
-.09 F -.135(ey)-.09 G 5.019(.T)-.45 G .519
(he real names of the commands)-5.019 F(are:)72 253 Q F1
(expand-or-complete)2.632 E F2 -.45(TA)16.2 G(B).45 E F1(push-line)2.444
E F2(ESC-Q)64.8 E F1(run-help)2.444 E F2(ESC-H)70.2 E F1(accept-)2.443 E
(and-hold)72 264 Q F2(ESC-A)32.4 E F1(quote-line)3.441 E F2(ESC-')59.4 E
F0 1.379(These bindings are arbitrary; you could change them if you)
3.441 F -.09(wa)72 275 S 3.248(nt. F).09 F .998(or e)-.135 F .998
(xample, to bind)-.135 F F1(accept-line)3.248 E F0(to)3.248 E F2(^Z)
3.248 E F0(:)A F1 5.4(%b)3.248 G(indkey '^Z' accept-line)-5.4 E F0 .998
(Another idea w)5.948 F .997(ould be to bind the)-.09 F .175(delete k)72
286 R .445 -.135(ey t)-.09 H(o).135 E F1(delete-char)2.425 E F0 2.425
(;t)C .175(his might be con)-2.425 F -.135(ve)-.36 G .175
(nient if you use).135 F F2(^H)2.425 E F0 .176(for backspace.)2.425 F F1
5.4(%b)4.676 G(indkey '^?' delete-char)-5.4 E F0(Or)5.126 E(,)-.36 E
.378(you could bind)72 297 R F2(^X^H)2.628 E F0(to)2.628 E F1(run-help)
2.628 E F0(:)A F1 5.4(%b)2.628 G(indkey '^X^H' run-help)-5.4 E F0 .378
(Other e)5.328 F(xamples:)-.135 E F1 5.4(%b)2.628 G
(indkey '^X^Z' univer-)-5.4 E 14.4(sal-argument %)72 308 R
(bindkey ' ' magic-space)5.4 E 5.4(%b)19.8 G(indkey -s '^T' 'uptime)-5.4
E 3.6 5.4(>' %b)19.8 H(ind-)-5.4 E(key '^Q' push-line-or-edit)72 319 Q
(universal-argument)7.284 E F0 2.334(multiplies the ne)4.584 F 2.334
(xt command by 4.)-.135 F(Thus)6.833 E F2(^X^Z^W)4.583 E F0(might)4.583
E .391(delete the last four w)72 330 R .392(ords on the line.)-.09 F
.392(If you bind space to)4.892 F F1(magic-space)2.642 E F0 2.642(,t)C
.392(hen csh-style history e)-2.642 F .392(xpansion is done on the line)
-.135 F(whene)72 341 Q -.135(ve)-.225 G 2.259(ry).135 G .009
(ou press the space bar)-2.259 F 4.509(.S)-.495 G .009(omething that of\
ten happens is that I am typing a multiline command and disco)-4.509 F
-.135(ve)-.135 G 2.259(ra).135 G 2.259(ne)-2.259 G .009(rror in)-2.259 F
.598(one of the pre)72 352 R .598(vious lines.)-.225 F .598
(In this case,)5.098 F F1(push-line-or-edit)2.848 E F0 .598
(will put the entire multiline construct into the editor b)2.848 F(uf)
-.18 E(fer)-.225 E 5.099(.I)-.495 G(f)-5.099 E .427
(there is only a single line, it is equi)72 363 R -.225(va)-.225 G .427
(lent to).225 F F1(push-line)2.677 E F0 4.927(.T)C(he)-4.927 E F1(-s)
2.677 E F0 .427(\215ag to)2.677 F F1(bindkey)2.677 E F0 .427
(speci\214es that you are binding the k)2.677 F .697 -.135(ey t)-.09 H
2.677(oa).135 G .949(string, not a command.)72 374 R(Thus)5.449 E F1
.949(bindkey -s '^T' 'uptime\\n')3.199 F F0 .95(lets you VMS lo)3.199 F
-.135(ve)-.135 G .95(rs get the load a).135 F -.135(ve)-.18 G .95
(rage whene).135 F -.135(ve)-.225 G 3.2(ry).135 G(ou)-3.2 E(press)72 385
Q F2(^T)2.768 E F0 5.018(.I)C 2.768(fy)-5.018 G .518(ou ha)-2.768 F .788
-.135(ve a N)-.18 H .518(eXT k).135 F -.135(ey)-.09 G .518
(board, the one with the).135 F F1(|)2.768 E F0(and)2.768 E F1(\\)2.768
E F0 -.09(ke)2.768 G .518(ys v)-.045 F .518(ery incon)-.135 F -.135(ve)
-.36 G .518(niently placed, the follo).135 F .517(wing bindings may)
-.225 F .092(come in handy:)72 396 R F1 5.4(%b)2.342 G
(indkey -s '\\e/' '\\\\')-5.4 E 5.4(%b)5.042 G(indkey -s '\\e=' '|')-5.4
E F0(No)5.042 E 2.342(wy)-.225 G .092(ou can type)-2.342 F F2(AL)2.342 E
-.666(T-)-.18 G(/).666 E F0 .092(to get a backslash,)2.342 F(and)72 407
Q F2(AL)2.32 E -.666(T-)-.18 G(=).666 E F0 .07(to get a v)2.32 F .07
(ertical bar)-.135 F 4.569(.T)-.495 G .069(his only w)-4.569 F .069
(orks inside)-.09 F/F3 9/Times-Bold@0 SF(zsh)2.319 E F0 2.319(,o)C 2.319
(fc)-2.319 G(ourse;)-2.319 E F1(bindkey)2.319 E F0 .069(has no ef)2.319
F .069(fect on the k)-.225 F .339 -.135(ey m)-.09 H .069(appings inside)
.135 F F1(talk)2.319 E F0(or)72 418 Q F1(mail)2.984 E F0 2.984(,e)C
2.984(tc. Some)-2.984 F .735(people lik)2.985 F 2.985(et)-.09 G 2.985
(ob)-2.985 G(ind)-2.985 E F1(^S)2.985 E F0(and)2.985 E F1(^Q)2.985 E F0
.735(to editor commands.)2.985 F .735(Just binding these has no ef)5.235
F .735(fect, as the terminal will)-.225 F .096
(catch them and use them for \215o)72 429 R 2.346(wc)-.225 G 2.346
(ontrol. Y)-2.346 F .096
(ou could unset them as stop and start characters, b)-.99 F .096
(ut most people lik)-.18 F 2.346(et)-.09 G 2.346(ou)-2.346 G .096
(se these for)-2.346 F -.135(ex)72 440 S .109(ternal commands.).135 F
.109(The solution is to set the)4.609 F F2(NOFLO)2.359 E(WCONTR)-.45 E
(OL)-.36 E F0 2.359(option. This)2.359 F .109(will allo)2.359 F 2.359
(wy)-.225 G .11(ou to bind the start and stop charac-)-2.359 F .23
(ters to editor commands, while retaining their normal use for e)72 451
R .23(xternal commands.)-.135 F -.135(Pa)4.73 G .229
(rameter Substitution P).135 F .229(arameter Substitution)-.135 F(In)72
462 Q F3(zsh)4.136 E F0 4.136(,p)C 1.886(arameters are set lik)-4.136 F
4.136(et)-.09 G(his:)-4.136 E F1 5.4(%f)4.136 G 1.436(oo=bar %)-5.4 F
(echo $foo)5.4 E(bar)6.836 E F0 1.886(Spaces before or after the)6.836 F
F1(=)4.136 E F0 1.886(are fro)4.136 F 1.886(wned upon:)-.225 F F1 5.4
(%f)72 473 S(oo = bar)-5.4 E(zsh: command not found: foo)6.092 E F0
(Also,)6.092 E F1(set)3.392 E F0(doesn')3.392 E 3.392(tw)-.162 G 1.142
(ork for setting parameters:)-3.482 F F1 5.4(%s)3.392 G(et foo=bar)-5.4
E 5.4(%s)72 484 S(et foo = bar)-5.4 E 5.4(%e)4.95 G(cho $foo)-5.4 E(%)72
506 Q F0 .143(Note that no error message w)5.093 F .143(as printed.)-.09
F .144(This is because both of these commands were perfectly v)4.643 F
.144(alid; the)-.225 F F1(set)2.394 E F0 -.18(bu)2.394 G .144
(iltin assigns).18 F .446(its ar)72 517 R .446(guments to the)-.162 F F2
.446(positional par)2.696 F(ameter)-.135 E(s)-.09 E F0(\()2.696 E F1($1)
A F0(,)A F1($2)2.695 E F0 2.695(,e)C(tc.\).)-2.695 E F1 5.4(%s)4.945 G
(et foo=bar)-5.4 E 5.4(%e)5.395 G(cho $1)-5.4 E -.005(foo=bar %)5.395 F
(set foo = bar)5.4 E 5.4(%e)72 528 S(cho $3 $2)-5.4 E(bar =)7.988 E F0
3.038(If you')7.988 F 3.039
(re really intent on using the csh syntax, de\214ne a function lik)-.45
F 5.289(et)-.09 G(his:)-5.289 E F1 5.4(%s)5.289 G(et \(\) {)-5.4 E 21.6
(>e)72 539 S(val "$1$2$3")-21.6 E -10.436 5.4(>} %s)5.764 H
(et foo = bar)-5.4 E 5.4(%s)5.764 G(et fuu=brrr)-5.4 E 5.4(%e)5.764 G
(cho $foo $fuu)-5.4 E(bar brrr)5.764 E F0 .813(But then,)5.764 F .408
(of course you can')72 550 R 2.658(tu)-.162 G .408(se the form of)-2.658
F F1(set)2.659 E F0 .409(with options, lik)2.659 F(e)-.09 E F1 .409
(set -F)2.659 F F0 .409(\(which turns of)2.659 F 2.659<668c>-.225 G .409
(lename generation\).)-2.659 F .409(Also, the)4.909 F F1(set)2.659 E F0
(com-)2.659 E 1.6(mand by itself w)72 561 R(on')-.09 E 3.85(tl)-.162 G
1.6(ist all the parameters lik)-3.85 F 3.85(ei)-.09 G 3.85(ts)-3.85 G
3.85(hould. T)-3.85 F 3.85(og)-.72 G 1.6(et around that you need a)-3.85
F F1(case)3.849 E F0(statement:)3.849 E F1 5.4(%s)3.849 G(et \(\) {)-5.4
E 21.6(>c)72 572 S(ase $1 in)-21.6 E 21.6(>-)4.95 G
(*|+*|''\) builtin set $* ;;)-21.6 E 21.6(>*)4.95 G 5.4(\)e)-21.6 G
(val "$1$2$3" ;;)-5.4 E 21.6(>e)4.95 G -.45(sac >)-21.6 F(})5.4 E F0
-.135(Fo)72 583 S 3.034(rt).135 G .784(he most part, this should mak)
-3.034 F 3.034(ec)-.09 G .784(sh users happ)-3.034 F 4.204 -.585(y. T)
-.09 H .784(he follo).585 F .784
(wing sh-style operators are supported in)-.225 F F3(zsh)3.034 E F0(:)A
F1 5.4(%u)3.034 G(nset null)-5.4 E 5.4(%e)72 594 S(cho ${foo-xxx})-5.4 E
6(bar %)11.4 F(echo ${null-xxx})5.4 E 6(xxx %)11.4 F(unset null)5.4 E
5.4(%e)11.4 G(cho ${null=xxx})-5.4 E(xxx)11.4 E 5.4(%e)72 605 S
(cho $null)-5.4 E -.45(xxx %)4.95 F(echo ${foo=xxx})5.4 E -.45(bar %)
4.95 F(echo $foo)5.4 E -.45(bar %)4.95 F(unset null)5.4 E 5.4(%e)4.95 G
(cho ${null+set})-5.4 E 5.4(%e)72 627 S(cho ${foo+set})-5.4 E(set)6.745
E F0 1.795(Also, csh-style)6.745 F F1(:)4.045 E F0 1.794
(modi\214ers may be appended to a parameter substitution.)4.045 F F1 5.4
(%e)6.294 G(cho $PWD)-5.4 E 26.1(/home/learning/pf/zsh/zsh2.00/src %)72
638 R(echo $PWD:h)5.4 E(/home/learning/pf/zsh/zsh2.00)31.5 E 5.4(%e)72
649 S(cho $PWD:h:h)-5.4 E -.3(/home/learning/pf/zsh %)5.1 F(echo $PWD:t)
5.4 E -.3(src %)5.1 F -.3(name=foo.c %)5.4 F(echo $name)5.4 E(foo.c)5.1
E 5.4(%e)72 660 S(cho $name:r)-5.4 E -.089(foo %)5.311 F(echo $name:e)
5.4 E(c)5.311 E F0 .361(The equi)5.311 F -.225(va)-.225 G .362
(lent constructs in ksh \(which are also supported in).225 F F3(zsh)
2.612 E F0 2.612(\)a)C .362(re a bit)-2.612 F .054
(more general and easier to remember)72 671 R 4.553(.W)-.495 G .053
(hen the shell e)-4.553 F(xpands)-.135 E F1(${foo#)2.303 E F2(pat)A F1
(})A F0 2.303(,i)C 2.303(tc)-2.303 G .053(hecks to see if)-2.303 F F2
(pat)2.303 E F0 .053(matches a substring at the be-)2.303 F .489
(ginning of the v)72 682 R .489(alue of)-.225 F F1(foo)2.739 E F0 4.989
(.I)C 2.739(fs)-4.989 G .489(o, it remo)-2.739 F -.135(ve)-.135 G 2.739
(st).135 G .489(hat portion of)-2.739 F F1(foo)2.74 E F0 2.74(,u)C .49
(sing the shortest possible match.)-2.74 F -.36(Wi)4.99 G(th).36 E F1
(${foo##)2.74 E F2(pat)A F1(})A F0 2.74(,t)C(he)-2.74 E .602
(longest possible match is remo)72 693 R -.135(ve)-.135 G(d.).135 E F1
(${foo%)5.102 E F2(pat)A F1(})A F0(and)2.852 E F1(${foo%%)2.852 E F2
(pat)A F1(})A F0(remo)2.852 E .872 -.135(ve t)-.135 H .601
(he match from the end.).135 F .601(Here are the ksh equi)5.101 F(v-)
-.225 E 3.607(alents of the)72 704 R F1(:)5.858 E F0(modi\214ers:)5.858
E F1 5.4(%e)5.858 G(cho ${PWD%/*})-5.4 E 3.158
(/home/learning/pf/zsh/zsh2.00 %)8.558 F(echo ${PWD%/*/*})5.4 E 1.5
(/home/learning/pf/zsh %)72 715 R(echo ${PWD##*/})5.4 E 1.5(src %)6.9 F
(echo ${name%.*})5.4 E 1.5(foo %)6.9 F(echo ${name#*.})5.4 E(c)6.9 E F3
(zsh)72 726 Q F0 1.07(also has upper/lo)3.32 F 1.07
(wercase modi\214ers:)-.225 F F1 5.4(%x)3.32 G .62(x=Test %)-5.4 F
(echo $xx:u)5.4 E .62(TEST %)6.02 F(echo $xx:l)5.4 E(test)6.02 E F0
1.071(and a substitution)6.021 F(modi\214er:)72 737 Q F1 5.4(%e)17.625 G
(cho $name:s/foo/bar/)-5.4 E 14.924(bar.c %)20.324 F 14.924(ls foo.c)5.4
F 16.2(foo.h foo.o foo.pro)21.6 F 5.4(%f)72 748 S
(or i in foo.*; mv $i $i:s/foo/bar/)-5.4 E 5.4(%l)6.082 G 6.082(sb)-5.4
G 16.2(ar.c bar.h bar.o bar.pro)-6.082 F F0 1.132(There is yet)6.082 F
1.407(another syntax to modify substituted parameters.)72 759 R -.99(Yo)
5.907 G 3.657(uc).99 G 1.406
(an add certain modi\214ers in parentheses after the opening brace lik)
-3.657 F(e:)-.09 E F1(${\()72 770 Q F2(modi\214er)A(s)-.09 E F1(\))A F2
(par)A(ameter)-.135 E F1(})A F0 -.135(Fo)11.136 G 8.436(re).135 G
(xample,)-8.571 E F1(o)8.436 E F0 6.186(sorts the w)8.436 F 6.186
(ords resulting from the e)-.09 F(xpansion:)-.135 E F1 5.4(%e)8.437 G
(cho ${path})-5.4 E(/usr/bin /usr/bin/X11 /etc)72 781 Q 5.4(%e)6.563 G
(cho ${\(o\)path})-5.4 E(/etc /usr/bin /usr/bin/X11)6.563 E F0 1.613
(One possible source)6.563 F 1.83(of confusion is the f)72 792 R 1.83
(act that in)-.09 F F3(zsh)4.08 E F0 4.081(,t)C 1.831
(he result of parameter substitution is)-4.081 F F2(not)4.081 E F0 1.831
(split into w)4.081 F 4.081(ords. Thus,)-.09 F 1.831(this will not w)
4.081 F(ork:)-.09 E 0 Cg EP
%%Page: 10 12
%%BeginPageSetup
BP
%%EndPageSetup
/F0 9/Courier@0 SF 5.4(%s)72 11 S(rcs='glob.c exec.c init.c')-5.4 E 5.4
(%l)6.419 G 5.4(s$)-5.4 G 1.019(srcs glob.c)-5.4 F
(exec.c init.c not found)5.4 E/F1 9/Times-Roman@0 SF 1.468
(This is considered a)6.419 F .851(feature, not a b)72 22 R 3.101
(ug. If)-.18 F .851(splitting were done by def)3.101 F .851
(ault, as it is in most other shells, functions lik)-.09 F 3.101(et)-.09
G .851(his w)-3.101 F .851(ould not w)-.09 F .852(ork properly:)-.09 F
F0 5.4($l)72 33 S 5.4(l\()-5.4 G 5.4(\){l)-5.4 G 5.4(s-)-5.4 G 5.4(F$)
-5.4 G 5.4(*})-5.4 G 5.4($l)-.45 G 5.4(l')-5.4 G(fuu bar')-5.4 E
(fuu not found)4.95 E(bar not found)4.95 E 5.4(%l)72 55 S 5.4(l')-5.4 G
(fuu bar')-5.4 E(fuu bar not found)8.161 E F1 3.211
(Of course, a hackish w)8.161 F 3.211(orkaround is a)-.09 F -.225(va)
-.18 G 3.211(ilable in sh \(and).225 F/F2 9/Times-Bold@0 SF(zsh)5.461 E
F1(\):)A F0 5.4(%s)5.46 G(e-)-5.4 E(topt shwordsplit)72 66 Q 5.4(%l)
5.056 G 5.4(l\()-5.4 G 5.4(\){l)-5.4 G 5.4(s-)-5.4 G 5.4(F")-5.4 G
($@" })-5.4 E 5.4(%l)5.056 G 5.4(l')-5.4 G(fuu bar')-5.4 E
(fuu bar not found)5.056 E F1 .106(If you lik)5.056 F 2.356(et)-.09 G
.106(he sh be-)-2.356 F(ha)72 77 Q(viour)-.18 E(,)-.36 E F2(zsh)7.488 E
F1 5.238(can accomodate you:)7.488 F F0 5.4(%l)7.488 G 5.4(s$)-5.4 G
4.788({=srcs} exec.c)-5.4 F 5.4(glob.c init.c)10.8 F 5.4(%s)10.188 G
(etopt shwordsplit)-5.4 E 5.4(%l)72 88 S 5.4(s$)-5.4 G 1.425
(srcs exec.c)-5.4 F 5.4(glob.c init.c)10.8 F F1 1.876(Another w)6.826 F
1.876(ay to get the)-.09 F F0($srcs)4.126 E F1 1.876(trick to w)4.126 F
1.876(ork is to use an array:)-.09 F F0 5.4(%u)4.126 G(n-)-5.4 E
(set srcs)72 99 Q 5.4(%s)7.368 G(rcs=\( glob.c exec.c init.c \))-5.4 E
5.4(%l)18.168 G 5.4(s$)-5.4 G 1.968(srcs exec.c)-5.4 F 5.4
(glob.c init.c)10.8 F F1 2.418(or an alias:)7.368 F F0 5.4(%a)72 110 S
(lias -g SRCS='exec.c glob.c init.c')-5.4 E 5.4(%l)6.96 G 5.4(sS)-5.4 G
1.56(RCS exec.c)-5.4 F 5.4(glob.c init.c)10.8 F F1 2.011
(Another option that)6.961 F 2.59(modi\214es parameter e)72 121 R 2.59
(xpansion is)-.135 F/F3 9/Times-Italic@0 SF(RCEXP)4.839 E(ANDP)-.81 E
(ARAM)-.81 E F1(:)A F0 5.4(%e)4.839 G(cho foo/$srcs)-5.4 E
(foo/glob.c exec.c init.c)7.539 E 5.4(%s)7.539 G(e-)-5.4 E
(topt rcexpandparam)72 132 Q 5.4(%e)55.8 G(cho foo/$srcs)-5.4 E
(foo/glob.c foo/exec.c foo/init.c)55.8 E 5.4(%e)72 143 S
(cho foo/${^srcs})-5.4 E(foo/glob.c foo/exec.c foo/init.c)50.4 E 5.4(%e)
50.4 G(cho foo/$^srcs)-5.4 E(foo/glob.c foo/exec.c foo/init.c)72 154 Q
F1 1.296(Shell P)6.246 F 1.296(arameters Shell P)-.135 F 1.296
(arameters The shell has man)-.135 F 3.546(yp)-.135 G 1.296
(rede\214ned parameters)-3.546 F 2.529(that may be accessed.)72 165 R
2.528(Here are some e)7.028 F(xamples:)-.135 E F0 5.4(%s)4.778 G
(leep 10 &)-5.4 E([1] 3820)7.478 E 5.4(%e)7.478 G(cho $!)-5.4 E 2.078
(3820 %)12.428 F(set a b c)5.4 E 5.4(%e)72 176 S(cho $#)-5.4 E 6.773(3%)
6.773 G(echo $ARGC)-1.373 E 6.773(3%)6.773 G 5.4(\(e)-1.373 G
(xit 20 \) ; echo $?)-5.4 E 1.373(20 %)11.723 F(false; echo $status)5.4
E(1)6.773 E F1(\()6.773 E F0($?)A F1(and)4.073 E F0($status)72 187 Q F1
7.545(are equi)9.795 F -.225(va)-.225 G(lent.\)).225 E F0 5.4(%e)12.045
G(cho $HOST $HOSTTYPE)-5.4 E(dendrite sun4)12.495 E 5.4(%e)12.495 G
(cho $UID $GID)-5.4 E(701 60)12.495 E 5.4(%c)72 198 S 5.4(d/)-5.4 G -.3
(tmp %)-5.4 F(cd /home)5.4 E 5.4(%e)5.1 G(cho $PWD $OLDPWD)-5.4 E
(/home /tmp)5.1 E 5.4(%l)5.1 G 5.4(s$)-5.4 G 5.1
(OLDPWD/.getwd /tmp/.getwd)-5.4 F(~+)5.1 E F1(and)72 209 Q F0(~-)3.64 E
F1 1.39(are short for)3.64 F F0($PWD)3.639 E F1(and)3.639 E F0($OLDPWD)
3.639 E F1 3.639(,r)C(especti)-3.639 E -.135(ve)-.225 G(ly).135 E(.)
-.585 E F0 5.4(%l)5.889 G 5.4(s~)-5.4 G .939(-/.getwd /tmp/.getwd %)-5.4
F(ls -d ~+/learning)5.4 E -.258(/home/learning %)72 220 R(echo $RANDOM)
5.4 E -.257(4880 %)5.143 F(echo $RANDOM)5.4 E -.257(11785 %)5.143 F
(echo $RANDOM)5.4 E -.257(2062 %)5.143 F(echo $TTY)5.4 E .786
(/dev/ttyp4 %)72 231 R(echo $VERSION)5.4 E(zsh v2.00.03)6.186 E 5.4(%e)
6.186 G(cho $USERNAME)-5.4 E(pf)6.186 E F1(The)6.186 E F0(cdpath)3.486 E
F1 -.225(va)3.486 G 1.235(riable sets the search).225 F 1.155
(path for the)72 242 R F0(cd)3.405 E F1 3.405(command. If)3.405 F 1.155
(you do not specify)3.405 F F0(.)3.405 E F1(some)3.405 E 1.155
(where in the path, it is assumed to be the \214rst component.)-.225 F
F0 5.4(%c)5.656 G(d-)-5.4 E(path=\( /usr ~ ~/zsh \))72 253 Q 5.4(%l)306
G 5.4(s/)-5.4 G(usr)-5.4 E 43.2(5bin dict lang net)72 264 R 43.2
(sccs sys)54 F(5in-)79.2 E 21.6(clude etc)72 275 R 32.4
(lector nserve services)54 F 25.2(tmp 5lib)27 F(ex-)48.6 E 32.4
(port lib)72 286 R 48.6(oed share)54 F 19.8(ucb adm)43.2 F 37.8
(games lo-)54 F 37.8(cal old)72 297 R 43.2(skel ucbinclude)54 F 48.6
(bin geac)72 308 R 10.8(lost+found openwin)48.6 F 37.8(spool ucblib)32.4
F 43.2(boot hosts)72 319 R 5.4(macsyma_417 pat)43.2 F 48.6(src xpg2bin)
54 F(de-)63 E 43.2(mo include)72 330 R 48.6(man princeton)32.4 F 37.8
(stand xpg2include)21.6 F(di-)52.2 E 43.2(ag kvm)72 341 R 43.2(mdec pub)
54 F 43.2(swap xpg2lib)54 F 5.4(%c)36 G 5.4(ds)-5.4 G(pool)-5.4 E 3.15
(/usr/spool %)72 352 R(cd bin)5.4 E 3.15(/usr/bin %)8.55 F(cd func)5.4 E
3.15(~/func %)8.55 F 8.55(cd %)5.4 F(cd pub)5.4 E 5.4(%p)8.55 G 3.15
(wd /u/pfalstad/pub)-5.4 F 5.4(%l)72 363 S 5.4(s-)-5.4 G 5.4(d/)-5.4 G
.339(usr/pub /usr/pub)-5.4 F F2 -.666(PA)5.739 G(TH)-.189 E F1(and)3.039
E F2(path)3.039 E F1 .789(both set the search path for commands.)3.039 F
.788(These tw)5.288 F 3.038(ov)-.09 G .788(ariables are equi)-3.263 F
(v-)-.225 E .448(alent, e)72 374 R .448
(xcept that one is a string and one is an array)-.135 F 4.948(.I)-.585 G
2.698(ft)-4.948 G .448(he user modi\214es)-2.698 F F2 -.666(PA)2.698 G
(TH)-.189 E F1 2.698(,t)C .448(he shell changes)-2.698 F F2(path)2.698 E
F1 .449(as well, and vice v)2.699 F(ersa.)-.135 E F0 5.4(%P)72 385 S
71.775(ATH=/bin:/usr/bin:/tmp:. %)-5.4 F(echo $path)5.4 E
(/bin /usr/bin /tmp .)72.225 E 5.4(%p)72 396 S
(ath=\( /usr/bin . /usr/local/bin /usr/ucb \))-5.4 E 5.4(%e)28.8 G
(cho $PATH)-5.4 E(/usr/bin:.:/usr/lo-)28.8 E(cal/bin:/usr/ucb)72 407 Q
F1 .464(The same is true of)5.414 F F2(CDP)2.713 E -.855(AT)-.666 G(H)
.855 E F1(and)2.713 E F2(cdpath)2.713 E F1(:)A F0 5.4(%e)2.713 G
(cho $CDPATH)-5.4 E(/usr:/u/pfalstad:/u/pfal-)5.413 E .375(stad/zsh %)72
418 R .376(CDPATH=/u/subbarao:/usr/src:/tmp %)5.4 F(echo $cdpath)5.4 E
(/u/subbarao /usr/src /tmp)5.776 E F1(In)5.776 E .576
(general, prede\214ned parameters with names in all lo)72 429 R .576
(wercase are arrays; assignments to them tak)-.225 F 2.826(et)-.09 G
.576(he form:)-2.826 F F3(name)2.826 E F0(=\()A F3(elem)4.5 E F1(...\\0)
4.5 E F0(\))A F1 .306
(Prede\214ned parameters with names in all uppercase are strings.)72 440
R .307(If there is both an array and a string v)4.807 F .307
(ersion of the same parame-)-.135 F(ter)72 451 Q 2.578(,t)-.36 G .328
(he string v)-2.578 F .328(ersion is a colon-separated list, lik)-.135 F
(e)-.09 E F2 -.666(PA)2.577 G(TH)-.189 E F1(.)A F2(HISTFILE)4.827 E F1
.327(is the name of the history \214le, where the history is sa)2.577 F
-.135(ve)-.18 G(d).135 E 15.04(when a shell e)72 462 R(xits.)-.135 E F0
5.4(%z)19.541 G 14.591(sh phoenix%)-5.4 F 14.591
(HISTFILE=/tmp/history phoenix%)5.4 F(SAVEHIST=20)5.4 E
(phoenix% echo foo)72 473 Q 9(foo phoenix%)14.4 F 9(date Fri)5.4 F
(May 24 05:39:35 EDT 1991)5.4 E(phoenix% uptime)14.4 E 5.4(5:39am up)
82.8 484 R 5.4(4d)5.4 G(ays, 20:02,)-5.4 E(40 users,)10.8 E
(load average: 2.30, 2.20, 2.00)10.8 E(phoenix% exit)19.8 E 5.4(%c)72
495 S(at /tmp/history)-5.4 E .515
(HISTFILE=/tmp/history SAVEHIST=20 echo)5.915 F .514
(foo date uptime exit %)5.4 F(HIST-)5.4 E .55(SIZE=3 %)72 506 R 16.75
(history 28)5.4 F(rm /tmp/history)10.8 E 5.4(29 HISTSIZE=3)22.15 F 5.4
(30 history)22.15 F F1 1(If you ha)5.95 F 1.271 -.135(ve s)-.18 H -1.935
-.225(ev e).135 H(ral).225 E .312(incantations of)72 517 R F2(zsh)2.562
E F1 .312(running at the same time, lik)2.562 F 2.562(ew)-.09 G .312
(hen using the X windo)-2.562 F 2.562(ws)-.225 G .311
(ystem, it might be preferable to append the history)-2.562 F .375
(of each shell to a \214le when a shell e)72 528 R .375
(xits instead of o)-.135 F -.135(ve)-.135 G .375
(rwriting the old contents of the \214le.).135 F -.99(Yo)4.875 G 2.625
(uc).99 G .375(an get this beha)-2.625 F .376(viour by setting)-.18 F
(the)72 539 Q F3(APPENDHIST)2.95 E(OR)-.162 E(Y)-.162 E F1 2.95
(option. In)2.95 F F2(zsh)2.949 E F1 2.949(,i)C 2.949(fy)-2.949 G .699
(ou say)-2.949 F F0 5.4(%>)2.949 G(file)-5.4 E F1 .699(the command)5.649
F F0(cat)2.949 E F1 .699(is normally assumed:)2.949 F F0 5.4(%>)2.949 G
.249(file foo!)-5.4 F -.32(^D %)72 550 R(cat file)5.4 E(foo!)5.08 E F1
.13(Thus, you can vie)10.03 F 2.38(wa\214)-.225 G .13
(le simply by typing:)-2.38 F F0 5.4(%<)2.38 G -.32(file foo!)-5.4 F F1
(Ho)10.03 E(we)-.225 E -.135(ve)-.225 G .85 -.36(r, t).135 H .131
(his is not csh or sh com-).36 F 2.824(patible. T)72 561 R 2.824(oc)-.72
G .574(orrect this, change the v)-2.824 F .574(alue of the parameter)
-.225 F F2(NULLCMD)2.824 E F1 2.824(,w)C .574(hich is)-2.824 F F0(cat)
2.824 E F1 .574(by def)2.824 F(ault.)-.09 E F0 5.4(%N)5.073 G .123
(ULLCMD=: %)-5.4 F(>file)5.4 E 5.4(%l)72 572 S 5.4(s-)-5.4 G 5.4(lf)-5.4
G .32(ile -rw-r--r--)-5.4 F 5.4(1p)10.8 G 37.8(falstad 0)-5.4 F
(May 24 05:41 file)5.4 E F1(If)5.72 E F0(NULLCMD)3.02 E F1 .771
(is unset, the shell re-)3.021 F 6.11
(ports an error if no command is speci\214ed \(lik)72 583 R 8.36(ec)-.09
G(sh\).)-8.36 E F0 5.4(%u)10.61 G(nset NULLCMD)-5.4 E 5.4(%>)11.06 G
5.66(file zsh:)-5.4 F(redirect-)5.4 E(ion with no command)72 594 Q F1
(Actually)5.151 E(,)-.585 E F2(READNULLCMD)2.451 E F1 .201
(is used whene)2.451 F -.135(ve)-.225 G 2.451(ry).135 G .201(ou ha)
-2.451 F .471 -.135(ve a n)-.18 H .201
(ull command reading input from a sin-).135 F .087(gle \214le.)72 605 R
.087(Thus, you can set)4.587 F F2(READNULLCMD)2.337 E F1(to)2.337 E F0
(more)2.337 E F1(or)2.337 E F0(less)2.337 E F1 .087(rather than)2.337 F
F0(cat)2.337 E F1 4.587(.A)C .087(lso, if you set)-4.587 F F2(NULLCMD)
2.337 E F1(to)2.337 E F0(:)2.337 E F1 .086(for sh com-)2.336 F
(patibility)72 616 Q 2.631(,y)-.585 G .381
(ou can still read \214les with)-2.631 F F0 5.782(<f)2.632 G(ile)-5.782
E F1 .382(if you lea)2.632 F -.135(ve)-.18 G F2(READNULLCMD)2.767 E F1
.382(set to)2.632 F F0(more)2.632 E F1 4.882(.P)C .382
(rompting Prompting The def)-4.882 F(ault)-.09 E .113(prompt for)72 627
R F2(zsh)2.363 E F1(is:)2.363 E F0(phoenix% echo $PROMPT)2.363 E(%m%#)
5.063 E F1(The)10.463 E F0(%m)2.363 E F1 .113
(stands for the short form of the current hostname, and the)2.363 F F0
(%#)2.362 E F1 .235(stands for a)72 638 R F0(%)2.485 E F1 .235(or a)
2.485 F F0(#)2.486 E F1 2.486(,d)C .236
(epending on whether the shell is running as root or not.)-2.486 F F2
(zsh)4.736 E F1 .236(supports man)2.486 F 2.486(yo)-.135 G .236
(ther control sequences in the)-2.486 F F2(PR)72 649 Q(OMPT)-.27 E F1
-.225(va)2.25 G(riable.).225 E F0 5.4(%P)4.5 G(ROMPT='%/> ')-5.4 E
(/u/pfalstad/etc/TeX/zsh>)4.95 E 5.4(%P)72 671 S(ROMPT='%~> ')-5.4 E
(~/etc/TeX/zsh>)21.15 E 5.4(%P)72 693 S(ROMPT='%h %~> ')-5.4 E 5.4(6~)
41.175 G 41.175(/etc/TeX/zsh> %h)-5.4 F F1 2.25
(represents the number of current history e)4.5 F -.135(ve)-.225 G(nt.)
.135 E F0 5.4(%P)72 704 S(ROMPT='%h %~ %M> ')-5.4 E
(10 ~/etc/TeX/zsh apple-gunkies.gnu.ai.mit.edu>)4.95 E 5.4(%P)72 726 S
(ROMPT='%h %~ %m> ')-5.4 E(11 ~/etc/TeX/zsh apple-gunkies>)4.95 E 5.4
(%P)72 748 S(ROMPT='%h %t> ')-5.4 E(12 6:11am>)4.95 E 5.4(%P)72 770 S
(ROMPT='%n %w tty%l>')-5.4 E(pfalstad Fri 24 ttyp0>)5.438 E F2(PR)5.438
E(OMPT2)-.27 E F1 .488(is used in multiline commands, lik)2.738 F 2.738
(ef)-.09 G(or)-2.738 E(-loops.)-.18 E(The)72 781 Q F0(%_)3.507 E F1
1.257(escape sequence w)3.507 F 1.256
(as made especially for this prompt.)-.09 F 1.256
(It is replaced by the kind of command that is being entered.)5.756 F F0
5.4(%P)72 792 S(ROMPT2='%_> ')-5.4 E 5.4(%f)4.95 G(or i in foo bar)-5.4
E(for>)4.95 E 0 Cg EP
%%Page: 11 13
%%BeginPageSetup
BP
%%EndPageSetup
/F0 9/Courier@0 SF 5.4(%e)72 22 S(cho 'hi)-5.4 E(quote>)5.326 E/F1 9
/Times-Roman@0 SF .376(Also a)5.326 F -.225(va)-.18 G .376
(ilable is the).225 F/F2 9/Times-Bold@0 SF(RPR)2.626 E(OMPT)-.27 E F1
(parameter)2.626 E 4.876(.I)-.495 G 2.626(ft)-4.876 G .376
(his is set, the shell puts a prompt on the)-2.626 F/F3 9/Times-Italic@0
SF(right)2.627 E F1 .377(side of)2.627 F(the screen.)72 33 Q F0 5.4(%R)
4.5 G -.45(PROMPT='%t' %)-5.4 F(6:14am)291.6 E 5.4(%R)72 55 S -.45
(PROMPT='%~' %)-5.4 F(~/etc/TeX/zsh)253.8 E 5.4(%P)72 77 S
(ROMPT='%l %T %m[%h] ' RPROMPT=' %~')-5.4 E(p0 6:15 phoenix[5])72 88 Q
(~/etc/TeX/zsh)162 E F1 1.04(These special escape sequences can)5.99 F
1.284(also be used with the)72 99 R F0(-P)3.534 E F1 1.284(option to)
3.534 F F0(print)3.534 E F1(:)A F0 5.4(%p)3.534 G(rint -P %h tty%l)-5.4
E(15 ttyp1)6.234 E F1(The)6.234 E F2(POSTEDIT)3.534 E F1 1.284
(parameter is printed)3.534 F(whene)72 110 Q -.135(ve)-.225 G 2.573(rt)
.135 G .323(he editor e)-2.573 F 2.573(xits. This)-.135 F .323
(can be useful for termcap tricks.)2.573 F 1.763 -.72(To h)4.823 H .323
(ighlight the prompt and command line while lea).72 F .324(ving com-)
-.18 F .275(mand output unhighlighted, try this:)72 121 R F0 5.4(%P)
2.525 G(OSTEDIT=`echotc se`)-5.4 E 5.4(%P)5.225 G(ROMPT='%S%% ')-5.4 E
F1 .275(Login/logout w)5.225 F .275(atching Login/lo-)-.09 F .037
(gout w)72 132 R .037(atching Y)-.09 F .037
(ou can specify login or logout e)-.99 F -.135(ve)-.225 G .038
(nts to monitor by setting the).135 F F2(watch)2.288 E F1 -.225(va)2.288
G 2.288(riable. Normally).225 F 2.288(,t)-.585 G .038
(his is done by specify-)-2.288 F 1.823(ing a list of usernames.)72 143
R F0 5.4(%w)6.323 G(atch=\( pfalstad subbarao sukthnkr egsirer \))-5.4 E
F1(The)6.772 E F0(log)4.072 E F1 1.822(command reports all)4.072 F 3.506
(people logged in that you are w)72 154 R 3.507(atching for)-.09 F(.)
-.495 E F0 5.4(%l)8.007 G 3.057(og pfalstad)-5.4 F
(has logged on p0 from mickey.)5.4 E(pfal-)13.407 E
(stad has logged on p5 from mickey.)72 165 Q(%)12.9 E F1(...)5.4 E F0
(subbarao has logged on p8 from phoenix.)12.9 E(%)12.9 E F1(...)5.4 E F0
(subbarao has logged off p8 from phoenix.)72 176 Q(%)22.725 E F1(...)5.4
E F0(sukthnkr has logged on p8 from dew.)22.725 E(%)72 187 Q F1(...)5.4
E F0(sukthnkr has logged off p8 from dew.)11.453 E F1 1.553
(If you specify hostnames with an)11.453 F F0(@)3.802 E F1 1.552
(prepended, the shell will)3.802 F -.09(wa)72 198 S 8.042
(tch for all users logging in from the speci\214ed host.).09 F F0 5.4
(%w)12.542 G(atch=\( @mickey @phoenix \))-5.4 E 5.4(%l)12.992 G(og)-5.4
E(djthongs has logged on q2 from phoenix.)72 209 Q
(pfalstad has logged on p0 from mickey.)12.6 E(pfal-)12.6 E
(stad has logged on p5 from mickey.)72 220 Q F1 .255(If you gi)10.155 F
.525 -.135(ve a t)-.225 H .256(ty name with a).135 F F0(%)2.506 E F1
.256(prepended, the shell will w)2.506 F .256(atch for all users)-.09 F
3.632(logging in on that tty)72 231 R(.)-.585 E F0 5.4(%w)8.132 G
(atch=\( %ttyp0 %console \))-5.4 E 5.4(%l)8.582 G 3.182(og root)-5.4 F
(has logged on console from .)5.4 E
(pfalstad has logged on p0 from mickey.)72 242 Q F1 9.188
(The format of the reports may also be changed.)19.088 F F0 5.4(%w)72
253 S(atch=\( pfalstad gettes eps djthongs jcorr bdavis \))-5.4 E 5.4
(%l)154.8 G(og)-5.4 E(jcorr has logged on tf from 128.112.176.3:0.)72
264 Q(jcorr has logged on r0 from 128.112.176.3:0.)72 275 Q
(gettes has logged on p4 from yo:0.0.)36 E
(djthongs has logged on pe from grumpy:0.0.)72 286 Q
(djthongs has logged on q2 from phoenix.)30.6 E
(bdavis has logged on qd from BRUNO.)72 297 Q
(eps has logged on p3 from csx30:0.0.)28.8 E(pfal-)28.8 E
(stad has logged on p0 from mickey.)72 308 Q
(pfalstad has logged on p5 from mickey.)79.2 E 5.4(%W)72 319 S
(ATCHFMT='%n on tty%l from %M')-5.4 E 5.4(%l)36.9 G 31.5(og jcorr)-5.4 F
(on ttytf from 128.112.176.3:0.)5.4 E
(jcorr on ttyr0 from 128.112.176.3:0.)72 330 Q
(gettes on ttyp4 from yo:0.0)127.8 E(djthongs on ttype from grumpy:0.0)
72 341 Q(djthongs on ttyq2 from phoenix.Princeto)79.2 E
(bdavis on ttyqd from BRUNO.pppl.gov)72 352 Q
(eps on ttyp3 from csx30:0.0)53.1 E(pfal-)53.1 E
(stad on ttyp0 from mickey.Princeton)72 363 Q
(pfalstad on ttyp5 from mickey.Princeton)68.4 E 5.4(%W)72 374 S
(ATCHFMT='%n fm %m')-5.4 E 5.4(%l)22.8 G 17.4(og jcorr)-5.4 F
(fm 128.112.176.3:0)5.4 E(jcorr fm 128.112.176.3:0)22.8 E
(gettes fm yo:0.0)72 385 Q(djthongs fm grumpy:0.0)26.4 E
(djthongs fm phoenix)26.4 E(bdavis fm BRUNO)26.4 E(eps fm csx30:0.0)72
396 Q(pfalstad fm mickey)12 E(pfalstad fm mickey)12 E 5.4(%W)12 G
(ATCHFMT='%n %a at %t %w.')-5.4 E 5.4(%l)72 407 S 34.425(og jcorr)-5.4 F
(logged on at 3:15pm Mon 20.)5.4 E(jcorr logged on at 3:16pm Wed 22.)
44.775 E(gettes logged on at 6:54pm Wed 22.)72 418 Q
(djthongs logged on at 7:19am Thu 23.)90 E
(djthongs logged on at 7:20am Thu 23.)72 429 Q
(bdavis logged on at 12:40pm Thu 23.)84.6 E
(eps logged on at 4:19pm Thu 23.)72 440 Q
(pfalstad logged on at 3:39am Fri 24.)39.6 E(pfal-)39.6 E
(stad logged on at 3:42am Fri 24.)72 451 Q F1 1.331(If you ha)11.231 F
1.601 -.135(ve a)-.18 H F0(.friends)3.716 E F1 1.331
(\214le in your home directory)3.581 F 3.58(,ac)-.585 G(on)-3.58 E -.135
(ve)-.36 G 1.33(nient w).135 F 1.33(ay to)-.09 F(mak)72 462 Q(e)-.09 E
F2(zsh)5.63 E F1 -.09(wa)5.63 G 3.38
(tch for all your friends is to do this:).09 F F0 5.4(%w)5.631 G
(atch=\( $\(< ~/.friends\) \))-5.4 E 5.4(%e)8.331 G(cho $watch)-5.4 E
(sub-)8.331 E(barao maruchck root sukthnkr)72 473 Q F1 2.68(... If)5.4 F
-.09(wa)3.056 G .805(tch is set to).09 F F0(all)3.055 E F1 3.055(,t)C
.805(hen all users logging in or out will be reported.)-3.055 F(Options)
5.305 E .598(Options Some options ha)72 484 R .868 -.135(ve a)-.18 H
.598(lready been mentioned; here are a fe).135 F 2.848(wm)-.225 G .598
(ore: Using the)-2.848 F F3 -.45(AU)2.848 G -.162(TO).45 G(CD).162 E F1
.598(option, you can simply type the)2.848 F 2.429(name of a directory)
72 495 R 4.678(,a)-.585 G 2.428(nd it will become the current directory)
-4.678 F(.)-.585 E F0 5.4(%c)6.928 G -8.822 5.4(d/ %s)-5.4 H
(etopt autocd)-5.4 E 5.4(%b)7.378 G 1.978(in %)-5.4 F 1.978(pwd /bin)5.4
F 5.4(%.)72 506 S -.275(./etc %)-5.4 F -.275(pwd /etc)5.4 F F1 -.36(Wi)
5.125 G(th).36 E F3(CD)2.425 E(ABLEV)-.315 E(ARS)-.54 E F1 2.425(,i)C
2.425(ft)-2.425 G .176(he ar)-2.425 F .176(gument to)-.162 F F0(cd)2.426
E F1 .176(is the name of a parameter whose v)2.426 F .176(alue is a v)
-.225 F .176(alid direc-)-.225 F(tory)72 517 Q 2.519(,i)-.585 G 2.519
(tw)-2.519 G .269(ill become the current directory)-2.519 F(.)-.585 E F0
5.4(%s)4.769 G(etopt cdablevars)-5.4 E 5.4(%f)5.219 G -.182(oo=/tmp %)
-5.4 F(cd foo)5.4 E(/tmp)5.218 E F3(CORRECT)5.218 E F1 .268(turns on)
2.518 F 2.343(spelling correction for commands, and the)72 528 R F3
(CORRECT)4.593 E(ALL)-.45 E F1 2.343
(option turns on spelling correction for all ar)4.593 F(guments.)-.162 E
F0 5.4(%s)6.843 G(e-)-5.4 E(topt correct)72 539 Q 5.4(%s)6.3 G 6.3(lz)
-5.4 G(sh: correct `sl' to `ls' [nyae]? y)-6.3 E 5.4(%s)6.3 G
(etopt correctall)-5.4 E 5.4(%l)6.3 G 5.4(sx)-5.4 G(.v11r4)-5.4 E
(zsh: correct `x.v11r4' to `X.V11R4' [nyae]? n)72 550 Q
(/usr/princton/src/x.v11r4 not found)36 E 5.4(%l)72 561 S 5.4(s/)-5.4 G
2.802(etc/paswd zsh:)-5.4 F
(correct to `/etc/paswd' to `/etc/passwd' [nyae]? y)5.4 E(/etc/passwd)
8.202 E F1(If)8.202 E .052(you press)72 572 R F0(y)2.302 E F1 .052
(when the shell asks you if you w)2.302 F .052(ant to correct a w)-.09 F
.052(ord, it will be corrected.)-.09 F .052(If you press)4.552 F F0(n)
2.302 E F1 2.302(,i)C 2.302(tw)-2.302 G .052(ill be left alone.)-2.302 F
(Press-)4.553 E(ing)72 583 Q F0(a)2.837 E F1 .587
(aborts the command, and pressing)2.837 F F0(e)2.837 E F1 .587
(brings the line up for editing ag)2.837 F .586
(ain, in case you agree the w)-.045 F .586(ord is spelled wrong b)-.09 F
(ut)-.18 E(you don')72 594 Q 2.25(tl)-.162 G(ik)-2.25 E 2.25(et)-.09 G
(he correction.)-2.25 E(Normally)4.5 E 2.25(,aq)-.585 G(uoted e)-2.25 E
(xpression may contain a ne)-.135 E(wline:)-.225 E F0 5.4(%e)2.25 G
(cho ')-5.4 E 5.4(>f)4.95 G -.45(oo >)-5.4 F(')5.4 E(foo)72 616 Q(%)72
638 Q F1 -.36(Wi)5.241 G(th).36 E F3(CSHJUNKIEQ)2.541 E(UO)-.09 E(TES)
-.36 E F1 .292(set, this is ille)2.542 F -.045(ga)-.135 G .292
(l, as it is in csh.).045 F F0 5.4(%s)4.792 G(etopt cshjunkiequotes)-5.4
E 5.4(%l)5.242 G 5.4(s')-5.4 G -.158(foo zsh:)-5.4 F(un-)5.4 E
(matched ')72 649 Q F3(GLOBDO)6.57 E(TS)-.36 E F1 1.62(lets \214les be)
3.87 F 1.62(ginning with a)-.135 F F0(.)3.869 E F1 1.619
(be matched without e)3.869 F 1.619(xplicitly specifying the dot.)-.135
F F0 5.4(%l)6.119 G 5.4(s-)-5.4 G 5.4(d*)-5.4 G(x*)-5.4 E -.45
(Mailboxes %)72 660 R(setopt globdots)5.4 E 5.4(%l)4.95 G 5.4(s-)-5.4 G
5.4(d*)-5.4 G -.45(x* .exrc)-5.4 F 5.4(.pnewsexpert .xserverrc)48.6 F
(.mushex-)4.95 E 10.8(pert .xinitrc)72 671 R(Mailboxes)32.4 E F3
(HISTIGNOREDUPS)5.548 E F1(pre)2.848 E -.135(ve)-.225 G .598
(nts the current line from being sa).135 F -.135(ve)-.18 G 2.847(di).135
G 2.847(nt)-2.847 G .597(he history if it)-2.847 F 1.546
(is the same as the pre)72 682 R 1.546(vious one;)-.225 F F3
(HISTIGNORESP)3.796 E -.27(AC)-.81 G(E).27 E F1(pre)3.797 E -.135(ve)
-.225 G 1.547(nts the current line from being sa).135 F -.135(ve)-.18 G
3.797(di).135 G 3.797(fi)-3.797 G 3.797(tb)-3.797 G -.135(eg)-3.797 G
1.547(ins with a space.).135 F F0 5.4(%P)72 693 S(ROMPT='%h> ')-5.4 E
(39> setopt histignoredups)18 E(40> echo foo)18 E 12.6(foo 41>)18 F
(echo foo)5.4 E(foo)18 E(41> echo foo)72 704 Q 7.8(foo 41>)13.2 F
(echo bar)5.4 E 7.8(bar 42>)13.2 F(setopt histignorespace)5.4 E 5.4
(43> echo)13.2 F 7.8(foo foo)5.4 F 5.4(43> echo)72 715 R 3.702
(fubar fubar 43>)5.4 F(echo fubar)10.8 E(fubar)9.102 E F3(IGNOREBRA)
9.102 E(CES)-.27 E F1 4.152(turns of)6.402 F 6.402(fc)-.225 G 4.152
(sh-style brace e)-6.402 F(xpansion.)-.135 E F0 5.4(%e)72 726 S
(cho x{y{z,a},{b,c}d}e)-5.4 E(xyze xyae xbde xcde)61.2 E 5.4(%s)61.2 G
(etopt ignorebraces)-5.4 E 5.4(%e)72 737 S(cho x{y{z,a},{b,c}d}e)-5.4 E
(x{y{z,a},{b,c}d}e)5.517 E F3(IGNOREEOF)5.517 E F1 .567
(forces the user to type)2.817 F F0(exit)2.817 E F1(or)2.817 E F0
(logout)2.817 E F1 2.817(,i)C(nstead)-2.817 E .29(of just pressing)72
748 R F3(^D)2.54 E F1(.)A F0 5.4(%s)4.79 G(etopt ignoreeof)-5.4 E 5.4
(%^)5.24 G 5.24(Dz)-5.4 G(sh: use 'exit' to exit.)-5.24 E F3(INTERA)
10.191 E(CTIVECOMMENTS)-.27 E F1(turns)2.541 E 15.739(on interacti)72
759 R 16.009 -.135(ve c)-.225 H 15.739(omments; comments be).135 F
15.739(gin with a)-.135 F F0(#)17.988 E F1(.)A F0 5.4(%s)20.238 G
(etopt interactivecomments)-5.4 E 5.4(%d)72 770 S
(ate # this is a comment)-5.4 E(Fri May 24 06:54:14 EDT 1991)6.229 E F3
(NOBEEP)6.229 E F1(mak)3.529 E 1.279(es sure the shell ne)-.09 F -.135
(ve)-.225 G 3.53(rb).135 G(eeps.)-3.53 E F3(NOCLOBBER)72 781 Q F1(pre)
13.288 E -.135(ve)-.225 G 11.038(nts you from accidentally o).135 F
-.135(ve)-.135 G 11.038(rwriting an e).135 F 11.038(xisting \214le.)
-.135 F F0 5.4(%s)15.538 G(etopt noclobber)-5.4 E 5.4(%c)72 792 S
(at /dev/null >~/.zshrc)-5.4 E(zsh: file exists: /u/pfalstad/.zshrc)
5.902 E F1 .952(If you really do w)5.902 F .952(ant to clobber a)-.09 F
0 Cg EP
%%Page: 12 14
%%BeginPageSetup
BP
%%EndPageSetup
/F0 9/Times-Roman@0 SF 3.077(\214le, you can use the)72 11 R/F1 9
/Courier@0 SF(>!)5.327 E F0(operator)5.327 E 7.577(.T)-.495 G 5.327(om)
-8.297 G(ak)-5.327 E 5.327(et)-.09 G 3.077
(hings easier in this case, the)-5.327 F F1(>)5.327 E F0 3.077
(is stored in the history list as a)5.327 F F1(>!)5.326 E F0(:)A F1 5.4
(%c)72 22 S(at /dev/null >! ~/.zshrc)-5.4 E 5.4(%c)20.7 G
(at /etc/motd > ~/.zshrc)-5.4 E(zsh: file exists: /u/pfal-)20.7 E .391
(stad/.zshrc %)72 33 R 5.341(!! cat)5.4 F(/etc/motd >! ~/.zshrc)5.4 E(%)
5.791 E F0(...)5.4 E/F2 9/Times-Italic@0 SF(RCQ)4.965 E(UO)-.09 E(TES)
-.36 E F0 .841(lets you use a more ele)3.091 F -.045(ga)-.135 G .841
(nt method for in-).045 F 5.555
(cluding single quotes in a singly quoted string:)72 44 R F1 5.4(%e)
7.805 G(cho '"don'\\''t do that."')-5.4 E("don't do that.")15.455 E 5.4
(%e)72 55 S(cho '"don''t do that."')-5.4 E("dont do that.")77.4 E 5.4
(%s)77.4 G(etopt rcquotes)-5.4 E 5.4(%e)72 66 S(cho '"don''t do that."')
-5.4 E("don't do that.")12.804 E F0(Finally)12.804 E(,)-.585 E F2
(SUNKEYBO)5.155 E(ARDHA)-.495 E(CK)-.27 E F0 2.905(wins the a)5.155 F
-.09(wa)-.135 G 2.905(rd for the).09 F .222(strangest option.)72 77 R
.222(If a line ends with)4.722 F F1(`)2.471 E F0 2.471(,a)C .221(nd the\
re are an odd number of them on the line, the shell will ignore the tra\
iling)-2.471 F F1(`)2.471 E F0 4.721(.T)C(his)-4.721 E 1.23(is pro)72 88
R 1.23(vided for k)-.135 F -.135(ey)-.09 G 1.231(boards whose RETURN k)
.135 F 1.501 -.135(ey i)-.09 H 3.481(st).135 G 1.231
(oo small, and too close to the)-3.481 F F1(`)3.481 E F0 -.09(ke)3.481 G
-.585(y.)-.045 G F1 5.4(%s)6.316 G(etopt sunkeyboardhack)-5.4 E 5.4(%d)
72 99 S -.21(ate` Fri)-5.4 F(May 24 06:55:38 EDT 1991)5.4 E F0 .239
(Closing Comments Closing Comments I \(Bas de Bakk)5.19 F .239(er\) w)
-.09 F .239(ould be happ)-.09 F(y)-.09 E .172(to recei)72 110 R .442
-.135(ve m)-.225 H .172(ail if an).135 F .172(yone has an)-.135 F 2.422
(yt)-.135 G .172(ricks or ideas to add to this document, or if there ar\
e some points that could be made clearer or)-2.422 F(co)72 121 Q -.135
(ve)-.135 G(red more thoroughly).135 E 4.5(.P)-.585 G
(lease notify me of an)-4.5 E 2.25(ye)-.135 G(rrors in this document.)
-2.25 E 0 Cg EP
%%Page: 1 15
%%BeginPageSetup
BP
%%EndPageSetup
0 Cg EP
%%Trailer
end
%%EOF
