FQA 8 − Using 9Front
Total Page:16
File Type:pdf, Size:1020Kb
FQA 8 − Using 9front 9DAn =FFlEA@ ?onIEIJAnJlO, IEmFlA ?onLAnJEonI ?=n ?om>EnA Jo FHoLE@A FoMAHBKl HAIKlJI. 1n 2l=n ', conventions =HA FHABAHHA@ Jo rules. 6DEI IA?JEon ANFloHAI JDA 2l=n ' =FFHo=?D Jo=?JK=llOKIEnCJDA?omFKJAH. 8.1 − rc rc was a startup script from very early times in Unix, shortened, as Ken was wont to do, from runcom, the nearest thing CTSS had to a shellߞit could run up to six prespecified commands in background. The name runcom came to be applied to the scripts as well as to their interpreter. ߞ ,oKCM?1lHoO 6DA rc IDAll M=I MHEJJAn >O 6om ,KBB BoH 4AIA=H?D 7N1: L. 1J M=I l=JAH =@oFJA@ =I JDA IDAll BoH 2l=n '. 5omA oB EJI ?onLAnJEonI =HA KnKIK=l ?omF=HA@ MEJD oJDAH ?omm=n@ EnJAHFHAJAHI EnBlKAn?A@ >O JDA *oKHnA IDAll. )lJDoKCD EJI IOnJ=N m=O IAAm IJH=nCA =J BEHIJ, D=LA F=JEAn?A; rc M=I @AIECnA@ JDEI M=O on FKHFoIA. On?A EJI BAM, >KJ FoMAHBKl BA=JKHAI=HAEnJAHn=lEzA@, rc IEmFlOCAJIoKJoBJDAM=O. 4A=@: Rc − The Plan 9 Shell, rc(1) 8.1.1 − Prompts +HA=JEnC =n rc BKn?JEon MEJD JDA I=mA n=mA =I OoKH FHomFJ =lloMI OoK Jo A=IElO @oK>lA-?lE?k Jo IAlA?J =J JDA An@ oB = FHALEoKIlO JOFA@ lEnA =n@ JDAn send EJ KIEnC JDA moKIA >KJJon mAnK IAA JDA @EI?KIIEon oB rio mAnKI, >AloM. 6DEI ?=n >A KIA@ Jo =FFHoNEm=JA = BoHm oB ?omm=n@ DEIJoHO IAA =lIo JDA ?omm=n@I =n@ , MDE?D FHEnJ =n@ANA?KJAJDAFHALEoKI?omm=n@,HAIFA?JELAlO. )@@IomAJDEnClEkAJDEIJoOoKH $home/profile: fn term%{ $* } 1n rc JDA ; ?D=H=?JAH BoH?AI JDA An@ oB = lEnA =n@ EI JHA=JA@ =I = nooF MDAn EJ =FFA=HI =lonA, Io EJ EI =lIo FoIIE>lA Jo ?HA=JA = IEmFlA FHomFJ JD=J MoKl@ HAGKEHA no IFA?E=l FHomFJ BKn?JEon En oH@AH BoH JDA FHomFJ Jo >A ABBA?JELAlO ECnoHA@ MDAn IAlA?JEnC =n@ IAn@EnC: prompt=´; ´ O>LEoKIlO,JDAFHomFJ?=n>An=mA@DoMALAHJDAKIAHIAAIBEJ. 8.1.2 − /env Note: +onJAnJI oB JDA /env @EHA?JoHO =HA FHoLE@A@ >O JDA kAHnAl =n@ HAFHAIAnJ = IAF= H=JA =??oKnJEnC oB JDA IDAllߣI AnLEHonmAnJ; rc HA=@I /env onlO on IJ=HJKF, =n@ BlKIDAI/MHEJAI /env onlO>ABoHAANA?KJEnCFHoCH=mI. ! 8.2 − rio rio EI JDA 2l=n ' MEn@oM IOIJAm. MoHA =??KH=JAlO, rio mKlJEFlANAI EnFKJ @ALE?AI MEJD =n@ IAHLAI = BElA EnJAHB=?A Jo = IAHEAI oB HA?J=nClAI, EnIE@A JDA >oKn@=HEAI oB MDE?D =HA @H=Mn =n =H>EJH=HO =HH=nCAmAnJ oB FENAlI. +onJHollEnC JDA HA?J=nClAI EI moHA IJH=ECDJBoH M=H@, =n@ =J JDA I=mA JEmA moHA BlANE>lA, JD=n MD=J EI ?ommonlO ANFA?JA@ BHom moIJ MEn@oMm=n=CAHI. 4A=@: rio(1), rio(4) 6o ABBA?JELAlO KIA rio, OoK nAA@ = JDHAA >KJJon moKIA. 1B OoK onlO D=LA = JMo >KJJon moKIA OoK?=nAmKl=JAJDAmE@@lA>KJJon>ODol@EnC@oMnJDA shift kAOMDElIJFHAII EnCJDAHECDJ>KJJon. Note: *KJJon , , =n@ ! =HA KIA@ Jo HABAH Jo JDA lABJ, mE@@lA, =n@ HECDJ >KJJonI HAIFA? JELAlO. 8.2.1 − The Pop−up Menu 2HAIIEnC =n@ Dol@EnC @oMn moKIA >KJJon ! on JDA CH=O @AIkJoF oH on = IDAll MEn@oM MEllCELAOoK=mAnKMEJDJDABolloMEnCoFJEonI: New Resize Move Delete Hide 2HAIIEnC=n@Dol@EnC@oMnmoKIA>KJJon on=IDAllMEn@oMHAIKlJIEn=mAnK MEJD JDA " BolloMEnCoFJEonI: cut paste snarf plumb look send scroll 5AlA?J =n EJAm >O HAlA=IEnC JDA >KJJon oLAH JDA mAnK EJAm. 4Eo KIAI JDA I=mA >KJJon JD=J IJ=HJA@ =n =?JEon JDHoKCDoKJ JD=J oFAH=JEon. 1B OoK FHAII =noJDAH >KJJon @KHEnC JDA =?JEonJDAoFAH=JEonEI=>oHJA@=n@=nOEnJAHmA@E=JA?D=nCAI=HAHALAHIA@. -=?D mAnK =?JI =I = =?JEon LAH> IAlA?JoH MDE?D JDAn HAGKEHAI =n o>jA?J E.A. MEn@oM Jo >A FE?kA@ Jo En@E?=JA MDE?D MEn@oM JDA LAH> EI Jo =?J on. ) BKHJDAH moKIA =?JEon m=O JDAn>AHAGKEHA@. 8.2.2 − Window control +lE?kEnCon=MEn@oM>HEnCIEJJoJDABHonJ. ;oK ?=n @EHA?JlO ?D=nCA JDA ID=FA oB = MEn@oM >O ?lE?kEnC =n@ @H=CCEnC on JDA A@CA oH ?oHnAH oB JDA MEn@oM >oH@AH. MoKIA >KJJon oH MEll =lloM OoK Jo @H=C JDA A@CA oH ?oHnAHJo=nAMIEzA,=n@moKIA>KJJon!MEll=lloMOoKJomoLAJDAMEn@oM. 6DA moKIA >KJJon ! mAnK ?onJ=EnI = lEIJ oB =ll MEn@oMI JD=J =HA ?oHHAnJlO o>IJHK?JA@ >O [email protected]?JEnC=l=>AlJoFIJDAMEn@oM. 6DA FoF-KF mAnK HAmAm>AHI JDA l=IJ ?omm=n@ ?DoIAn, Io =I = IDoHJ?KJ OoK ?=n jKIJ FHAII =n@ HAlA=IA >KJJon ! MEJDoKJ moLEnC JDA moKIA >AJMAAn FHAIIEnC =n@ HAlA=IEnC JoIAlA?JJDAFHALEoKI?omm=n@=C=En. 1n =@@EJEon, rio IAHLAI = L=HEAJO oB BElAI BoH HA=@EnC, MHEJEnC, =n@ ?onJHollEnC MEn@oMI. 5omA oB JDAm =HA LEHJK=l LAHIEonI oB IOIJAm BElAI BoH @A=lEnC MEJD JDA @EIFl=O, kAO>o=H@, =n@moKIA; oJDAHI ?onJHol oFAH=JEonI oB JDA MEn@oM IOIJAm EJIAlB. 6DAIA BElAI, =I MAll =I JDA window(1) ?omm=n@, =lloM BoH ?onJHollEnC MEn@oMI FHoCH=mm=JE?=llO >O HA=@EnC =n@ MHEJEnC JANJ IJHEnCI. 6DKI IEmFlEBOEnC JDA =KJom=JA@ oFAnEnC =n@ Fl=?AmAnJ oB L=HE oKIMEn@oMIMEJDKIAHI?HEFJI. 4A=@: rio(4) 8.2.3 − Text in rio windows 6ANJ En = rio MEn@oM m=O >A BHAAlO m=nEFKl=JA@, A@EJA@, =lJAHA@, @AlAJA@ =n@/oH =?JA@ KFon KIEnC AEJDAH moKIA ?DoH@I oH JDA oFJEonI BHom JDA moKIA >KJJon mAnKI. .oH =n # AN=mFlA,IAAJDA@EI?KIIEonoBJDAKIAoB rc FHomFJI,=>oLA. 6DA IFA?E=l BElA /dev/text BoH JDA ?KHHAnJ MEn@oM, oH /mnt/wsys/n/text BoH MEn@oM n ?onJ=EnI =ll JANJ JD=J D=I =lHA=@O =FFA=HA@ En JDA MEn@oM. 6DA ?onJAnJI oB JDEI BElA m=O IAHLA =I = FHEmEJELA BoHm oB ?omm=n@ DEIJoHO =n@ m=O >A =?JA@ KFon KIEnCIJ=n@=H@?omm=n@lEnAJoolI,>KJ=HAloIJMDAnJDAMEn@oMEI?loIA@. 5AHEoKIlO,HA=@: rio(4) 8.2.4 − Scrolling *O @AB=KlJ, = rio MEn@oM MEll BEll KF MEJD JANJ =n@ JDAn >lo?k, o>LE=JEnC JDA nAA@ BoH = IAF=H=JAF=CAHFHoCH=mJDoKCDJDA p(1) F=CAHFHoCH=mIJEllIDEFIMEJDJDAIOIJAm. -n@lAIII?HollEnCm=O>AAn=>lA@>OIAlA?JEnC scroll BHomJDAmoKIA>KJJon mAnK. 6DA up oH down =HHoM kAOI =n@ pgup oH pgdwn kAOI m=O >A KIA@ Jo I?Holl KF oH @oMnEn?onIEIJAnJlOmA=IKHA@En?HAmAnJI. 0ol@EnC @oMn JDA shift kAO =n@ FHAIIEnC JDA KF oH @oMn =HHoM kAO MEll I?Holl = IEnClA lEnAEnJDAHAIFA?JELA@EHA?JEon. 'BHonJߣI rio IKFFoHJI moKIAMDAAl I?HollEnC. 6DA DAKHEIJE? AmFloOA@ EI HoKCDlO JDA I=mA =I JD=J oB ?lE?kEnC En JDA I?Holl>=H on JDA lABJ oB JDA MEn@oM: MDAn JDA moKIA FoEnJAH EI nA=H JDA JoF oB JDA MEn@oM JDA I?HollEnC En?HAmAnJ EI Im=ll, MDElA =I JDA moKIA FoEnJAH =FFHo=?DAI JDA >oJJom oB JDA MEn@oM JDA I?HollEnC En?HAmAnJ CHoMI FHo CHAIIELAlO l=HCAH. 2HAIAnJlO JDEI >AD=LEoH EI lEmEJA@ Jo rio, sam, =n@ mothra >KJ m=O l=JAH>AANJAn@A@JooJDAHFHoCH=mI. Note: 9DElA JDA >AD=LEoH oB JDA =HHoM =n@ F=CA kAOI EI B=EHlO ?onIEIJAnJ >AJMAAn FHo CH=mI,moKIAMDAAlI?HollEnCEInoJ.5oB=H, shift up oH down EIonlOIKFFoHJA@En rio MEn@oMI. 8.2.5 − Mouse Chording )lmoIJ =nOMDAHA ߞ sam(1), acme(1), window(1) ߞ OoK ?=n KIA JDA BolloMEnC moKIA?DoH@I: mb1 ߞ 5AlA?JJANJ. mb1 double click ߞ 5AlA?J MoH@ Kn@AH ?KHIoH, oH =J JDA An@/IJ=HJ oB = lEnA, IAlA?J JDAMDolAlEnA. )BJAHIAlA?JEnCMEJD mb1 =n@MDElAIJEllDol@EnC mb1 @oMnJDAIA?DoH@I=lIo MoHk MEJD JANJ IAlA?JA@ >O @oK>lA-?lE?kEnC, JDA @oK>lA-?lE?k ANF=nIEon D=FFAnI MDAn JDAIA?on@ ?lE?kIJ=HJI,noJMDAnEJAn@I: mb2 ߞ +KJJANJ. mb3 ߞ 2=IJAJANJ?=n>AHALAHJA@>O?lE?kEnC mb2 EmmA@E=JAlO=BJAHM=H@I. $ 6oIn=HB?oFO,?lE?k mb2 EmmA@E=JAlOBolloMA@>O mb3. 8.2.6 − Keyboard Shortcuts )lmoIJ =nOMDAHA ߞ sam(1), acme(1), window(1) ߞ OoK ?=n KIA JDA BolloMEnC IDoHJ?KJI: Ctrl−u ߞ ,AlAJABHom?KHIoHJoIJ=HJoBlEnA. Ctrl−w ߞ ,AlAJAMoH@>ABoHAJDA?KHIoH. Ctrl−h ߞ ,AlAJA?D=H=?JAH>ABoHAJDA?KHIoH. Ctrl−a ߞ MoLA?KHIoHJoIJ=HJoBJDAlEnA. Ctrl−e ߞ MoLA?KHIoHJoAn@oBJDAlEnA. Ctrl−b ߞ MoLA?KHIoHJoJDAFoIEJEonEmmA@E=JAlO=BJAHJDAFHomFJ.rio onlO 4A=@:7N1:KAO>o=H@*En@EnCI 1n= rio(1) MEn@oM,I?HollKFoH@oMnonAlEnA>ODol@EnC shift =n@ FHAIIEnC JDA KF oH@oMn=HHoM. % 8.2.7 − Color scheme rio lookIlEkAJDEI: rioߣI ?oloH I?DAmA m=O >A mo@EBEA@ >O A@EJEnC JDA .? ?onBECKH=JEon BElAI =n@ HA- ?omFElEnC: Note: 5omAonAMEllmo?kOoKBoH@oEnCJDEI. 5AA:DJJF://Fl=n'.IJ=nlAOlEA>AH.?om/HEo,DJJFI://BJHL.IA/" & 4o>2EkA,HEoߣI=KJDoH,M=I=lllEkA: JDA ?lA=n =FFA=H=n?A oB JDA I?HAAn ?omAI moIJlO BHom l=zEnAII, >KJ JDA ?oloH I?DAmA EI o>LEoKIlO @AlE>AH=JA. JDA EnJAnJ M=I Jo >KEl@ on =n o>IAHL=JEon >O A@M=H@ JKBJA JD=J JDA DKm=n IOIJAm lEkAI n=JKHA =n@ n=JKHA EI BKll oB F=lA ?ol oHI, Io IomAJDEnC OoKߣHA CoEnC Jo look =J =ll @=O mECDJ >AIJ IAHLA EB EJ MAHA =lIo En HAl=NEnC ID=@AI. HAnAA BHAn?D DAlFA@ mA MEJD JDA IFA?EBE?I oB JDA ?oloH I?DAmA IDAߣI = FHoBAIIEon=l EllKIJH=JoH =n@ mO ?oloH LEIEon EI IKIFA?J, on?A Eߣ@ BECKHA@ oKJ DoM E M=nJA@ EJ Jo look.