home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / source / a2.0bemacs-src.lha / Emacs-19.25 / lisp / shell.elc < prev    next >
Emacs Compiled Lisp  |  1994-05-22  |  18.9 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was processed as: Emacs Compiled Lisp (other/emacsCompiledLisp).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
100% file Emacs/XEmacs v19 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 13 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 72 6d 73 40 6d 6f 6c |piled by| rms@mol|
|00000020| 65 2e 67 6e 75 2e 61 69 | 2e 6d 69 74 2e 65 64 75 |e.gnu.ai|.mit.edu|
|00000030| 20 6f 6e 20 53 75 6e 20 | 4d 61 79 20 32 32 20 30 | on Sun |May 22 0|
|00000040| 33 3a 31 36 3a 35 30 20 | 31 39 39 34 0a 3b 3b 3b |3:16:50 |1994.;;;|
|00000050| 20 66 72 6f 6d 20 66 69 | 6c 65 20 2f 68 6f 6d 65 | from fi|le /home|
|00000060| 2f 66 73 66 2f 72 6d 73 | 2f 65 31 39 2f 6c 69 73 |/fsf/rms|/e19/lis|
|00000070| 70 2f 73 68 65 6c 6c 2e | 65 6c 0a 3b 3b 3b 20 65 |p/shell.|el.;;; e|
|00000080| 6d 61 63 73 20 76 65 72 | 73 69 6f 6e 20 31 39 2e |macs ver|sion 19.|
|00000090| 32 33 2e 39 30 2e 31 2e | 0a 3b 3b 3b 20 62 79 74 |23.90.1.|.;;; byt|
|000000a0| 65 63 6f 6d 70 20 76 65 | 72 73 69 6f 6e 20 46 53 |ecomp ve|rsion FS|
|000000b0| 46 20 32 2e 31 30 0a 3b | 3b 3b 20 6f 70 74 69 6d |F 2.10.;|;; optim|
|000000c0| 69 7a 61 74 69 6f 6e 20 | 69 73 20 6f 6e 2e 0a 3b |ization |is on..;|
|000000d0| 3b 3b 20 74 68 69 73 20 | 66 69 6c 65 20 75 73 65 |;; this |file use|
|000000e0| 73 20 6f 70 63 6f 64 65 | 73 20 77 68 69 63 68 20 |s opcode|s which |
|000000f0| 64 6f 20 6e 6f 74 20 65 | 78 69 73 74 20 69 6e 20 |do not e|xist in |
|00000100| 45 6d 61 63 73 20 31 38 | 2e 0a 0a 28 69 66 20 28 |Emacs 18|...(if (|
|00000110| 61 6e 64 20 28 62 6f 75 | 6e 64 70 20 27 65 6d 61 |and (bou|ndp 'ema|
|00000120| 63 73 2d 76 65 72 73 69 | 6f 6e 29 0a 09 20 28 6f |cs-versi|on).. (o|
|00000130| 72 20 28 61 6e 64 20 28 | 62 6f 75 6e 64 70 20 27 |r (and (|boundp '|
|00000140| 65 70 6f 63 68 3a 3a 76 | 65 72 73 69 6f 6e 29 20 |epoch::v|ersion) |
|00000150| 65 70 6f 63 68 3a 3a 76 | 65 72 73 69 6f 6e 29 0a |epoch::v|ersion).|
|00000160| 09 20 20 20 20 20 28 73 | 74 72 69 6e 67 2d 6c 65 |. (s|tring-le|
|00000170| 73 73 70 20 65 6d 61 63 | 73 2d 76 65 72 73 69 6f |ssp emac|s-versio|
|00000180| 6e 20 22 31 39 22 29 29 | 29 0a 20 20 20 20 28 65 |n "19"))|). (e|
|00000190| 72 72 6f 72 20 22 60 2f | 68 6f 6d 65 2f 66 73 66 |rror "`/|home/fsf|
|000001a0| 2f 72 6d 73 2f 65 31 39 | 2f 6c 69 73 70 2f 73 68 |/rms/e19|/lisp/sh|
|000001b0| 65 6c 6c 2e 65 6c 27 20 | 77 61 73 20 63 6f 6d 70 |ell.el' |was comp|
|000001c0| 69 6c 65 64 20 66 6f 72 | 20 45 6d 61 63 73 20 31 |iled for| Emacs 1|
|000001d0| 39 22 29 29 0a 0a 28 72 | 65 71 75 69 72 65 20 28 |9"))..(r|equire (|
|000001e0| 71 75 6f 74 65 20 63 6f | 6d 69 6e 74 29 29 0a 28 |quote co|mint)).(|
|000001f0| 64 65 66 76 61 72 20 73 | 68 65 6c 6c 2d 70 72 6f |defvar s|hell-pro|
|00000200| 6d 70 74 2d 70 61 74 74 | 65 72 6e 20 22 5e 5b 5e |mpt-patt|ern "^[^|
|00000210| 23 24 25 3e 5c 6e 5d 2a | 5b 23 24 25 3e 5d 20 2a |#$%>\n]*|[#$%>] *|
|00000220| 22 20 22 5c 0a 52 65 67 | 65 78 70 20 74 6f 20 6d |" "\.Reg|exp to m|
|00000230| 61 74 63 68 20 70 72 6f | 6d 70 74 73 20 69 6e 20 |atch pro|mpts in |
|00000240| 74 68 65 20 69 6e 66 65 | 72 69 6f 72 20 73 68 65 |the infe|rior she|
|00000250| 6c 6c 2e 0a 44 65 66 61 | 75 6c 74 73 20 74 6f 20 |ll..Defa|ults to |
|00000260| 5c 22 5e 5b 5e 23 24 25 | 3e 5c 5c 6e 5d 2a 5b 23 |\"^[^#$%|>\\n]*[#|
|00000270| 24 25 3e 5d 20 2a 5c 22 | 2c 20 77 68 69 63 68 20 |$%>] *\"|, which |
|00000280| 77 6f 72 6b 73 20 70 72 | 65 74 74 79 20 77 65 6c |works pr|etty wel|
|00000290| 6c 2e 0a 54 68 69 73 20 | 76 61 72 69 61 62 6c 65 |l..This |variable|
|000002a0| 20 69 73 20 75 73 65 64 | 20 74 6f 20 69 6e 69 74 | is used| to init|
|000002b0| 69 61 6c 69 73 65 20 60 | 63 6f 6d 69 6e 74 2d 70 |ialise `|comint-p|
|000002c0| 72 6f 6d 70 74 2d 72 65 | 67 65 78 70 27 20 69 6e |rompt-re|gexp' in|
|000002d0| 20 74 68 65 20 0a 73 68 | 65 6c 6c 20 62 75 66 66 | the .sh|ell buff|
|000002e0| 65 72 2e 0a 0a 54 68 65 | 20 70 61 74 74 65 72 6e |er...The| pattern|
|000002f0| 20 73 68 6f 75 6c 64 20 | 70 72 6f 62 61 62 6c 79 | should |probably|
|00000300| 20 6e 6f 74 20 6d 61 74 | 63 68 20 6d 6f 72 65 20 | not mat|ch more |
|00000310| 74 68 61 6e 20 6f 6e 65 | 20 6c 69 6e 65 2e 20 20 |than one| line. |
|00000320| 49 66 20 69 74 20 64 6f | 65 73 2c 0a 73 68 65 6c |If it do|es,.shel|
|00000330| 6c 2d 6d 6f 64 65 20 6d | 61 79 20 62 65 63 6f 6d |l-mode m|ay becom|
|00000340| 65 20 63 6f 6e 66 75 73 | 65 64 20 74 72 79 69 6e |e confus|ed tryin|
|00000350| 67 20 74 6f 20 64 69 73 | 74 69 6e 67 75 69 73 68 |g to dis|tinguish|
|00000360| 20 70 72 6f 6d 70 74 20 | 66 72 6f 6d 20 69 6e 70 | prompt |from inp|
|00000370| 75 74 0a 6f 6e 20 6c 69 | 6e 65 73 20 77 68 69 63 |ut.on li|nes whic|
|00000380| 68 20 64 6f 6e 27 74 20 | 73 74 61 72 74 20 77 69 |h don't |start wi|
|00000390| 74 68 20 61 20 70 72 6f | 6d 70 74 2e 0a 0a 54 68 |th a pro|mpt...Th|
|000003a0| 69 73 20 69 73 20 61 20 | 66 69 6e 65 20 74 68 69 |is is a |fine thi|
|000003b0| 6e 67 20 74 6f 20 73 65 | 74 20 69 6e 20 79 6f 75 |ng to se|t in you|
|000003c0| 72 20 60 2e 65 6d 61 63 | 73 27 20 66 69 6c 65 2e |r `.emac|s' file.|
|000003d0| 22 29 0a 28 64 65 66 76 | 61 72 20 73 68 65 6c 6c |").(defv|ar shell|
|000003e0| 2d 63 6f 6d 70 6c 65 74 | 69 6f 6e 2d 66 69 67 6e |-complet|ion-fign|
|000003f0| 6f 72 65 20 6e 69 6c 20 | 22 5c 0a 2a 4c 69 73 74 |ore nil |"\.*List|
|00000400| 20 6f 66 20 73 75 66 66 | 69 78 65 73 20 74 6f 20 | of suff|ixes to |
|00000410| 62 65 20 64 69 73 72 65 | 67 61 72 64 65 64 20 64 |be disre|garded d|
|00000420| 75 72 69 6e 67 20 66 69 | 6c 65 2f 63 6f 6d 6d 61 |uring fi|le/comma|
|00000430| 6e 64 20 63 6f 6d 70 6c | 65 74 69 6f 6e 2e 0a 54 |nd compl|etion..T|
|00000440| 68 69 73 20 76 61 72 69 | 61 62 6c 65 20 69 73 20 |his vari|able is |
|00000450| 75 73 65 64 20 74 6f 20 | 69 6e 69 74 69 61 6c 69 |used to |initiali|
|00000460| 7a 65 20 60 63 6f 6d 69 | 6e 74 2d 63 6f 6d 70 6c |ze `comi|nt-compl|
|00000470| 65 74 69 6f 6e 2d 66 69 | 67 6e 6f 72 65 27 20 69 |etion-fi|gnore' i|
|00000480| 6e 20 74 68 65 20 73 68 | 65 6c 6c 0a 62 75 66 66 |n the sh|ell.buff|
|00000490| 65 72 2e 20 20 54 68 65 | 20 64 65 66 61 75 6c 74 |er. The| default|
|000004a0| 20 69 73 20 6e 69 6c 2c | 20 66 6f 72 20 63 6f 6d | is nil,| for com|
|000004b0| 70 61 74 69 62 69 6c 69 | 74 79 20 77 69 74 68 20 |patibili|ty with |
|000004c0| 6d 6f 73 74 20 73 68 65 | 6c 6c 73 2e 0a 53 6f 6d |most she|lls..Som|
|000004d0| 65 20 70 65 6f 70 6c 65 | 20 6c 69 6b 65 20 28 5c |e people| like (\|
|000004e0| 22 7e 5c 22 20 5c 22 23 | 5c 22 20 5c 22 25 5c 22 |"~\" \"#|\" \"%\"|
|000004f0| 29 2e 0a 0a 54 68 69 73 | 20 69 73 20 61 20 66 69 |)...This| is a fi|
|00000500| 6e 65 20 74 68 69 6e 67 | 20 74 6f 20 73 65 74 20 |ne thing| to set |
|00000510| 69 6e 20 79 6f 75 72 20 | 60 2e 65 6d 61 63 73 27 |in your |`.emacs'|
|00000520| 20 66 69 6c 65 2e 22 29 | 0a 28 64 65 66 76 61 72 | file.")|.(defvar|
|00000530| 20 73 68 65 6c 6c 2d 64 | 65 6c 69 6d 69 74 65 72 | shell-d|elimiter|
|00000540| 2d 61 72 67 75 6d 65 6e | 74 2d 6c 69 73 74 20 28 |-argumen|t-list (|
|00000550| 71 75 6f 74 65 20 28 31 | 32 34 20 33 38 20 36 30 |quote (1|24 38 60|
|00000560| 20 36 32 20 34 30 20 34 | 31 20 35 39 29 29 20 22 | 62 40 4|1 59)) "|
|00000570| 5c 0a 4c 69 73 74 20 6f | 66 20 63 68 61 72 61 63 |\.List o|f charac|
|00000580| 74 65 72 73 20 74 6f 20 | 72 65 63 6f 67 6e 69 73 |ters to |recognis|
|00000590| 65 20 61 73 20 73 65 70 | 61 72 61 74 65 20 61 72 |e as sep|arate ar|
|000005a0| 67 75 6d 65 6e 74 73 2e | 0a 54 68 69 73 20 76 61 |guments.|.This va|
|000005b0| 72 69 61 62 6c 65 20 69 | 73 20 75 73 65 64 20 74 |riable i|s used t|
|000005c0| 6f 20 69 6e 69 74 69 61 | 6c 69 7a 65 20 60 63 6f |o initia|lize `co|
|000005d0| 6d 69 6e 74 2d 64 65 6c | 69 6d 69 74 65 72 2d 61 |mint-del|imiter-a|
|000005e0| 72 67 75 6d 65 6e 74 2d | 6c 69 73 74 27 20 69 6e |rgument-|list' in|
|000005f0| 20 74 68 65 0a 73 68 65 | 6c 6c 20 62 75 66 66 65 | the.she|ll buffe|
|00000600| 72 2e 20 20 54 68 65 20 | 64 65 66 61 75 6c 74 20 |r. The |default |
|00000610| 69 73 20 28 3f 5c 5c 7c | 20 3f 26 20 3f 3c 20 3f |is (?\\|| ?& ?< ?|
|00000620| 3e 20 3f 5c 5c 28 20 3f | 5c 5c 29 20 3f 5c 5c 3b |> ?\\( ?|\\) ?\\;|
|00000630| 29 2e 0a 0a 54 68 69 73 | 20 69 73 20 61 20 66 69 |)...This| is a fi|
|00000640| 6e 65 20 74 68 69 6e 67 | 20 74 6f 20 73 65 74 20 |ne thing| to set |
|00000650| 69 6e 20 79 6f 75 72 20 | 60 2e 65 6d 61 63 73 27 |in your |`.emacs'|
|00000660| 20 66 69 6c 65 2e 22 29 | 0a 28 64 65 66 76 61 72 | file.")|.(defvar|
|00000670| 20 73 68 65 6c 6c 2d 64 | 79 6e 61 6d 69 63 2d 63 | shell-d|ynamic-c|
|00000680| 6f 6d 70 6c 65 74 65 2d | 66 75 6e 63 74 69 6f 6e |omplete-|function|
|00000690| 73 20 28 71 75 6f 74 65 | 20 28 63 6f 6d 69 6e 74 |s (quote| (comint|
|000006a0| 2d 72 65 70 6c 61 63 65 | 2d 62 79 2d 65 78 70 61 |-replace|-by-expa|
|000006b0| 6e 64 65 64 2d 68 69 73 | 74 6f 72 79 20 73 68 65 |nded-his|tory she|
|000006c0| 6c 6c 2d 64 79 6e 61 6d | 69 63 2d 63 6f 6d 70 6c |ll-dynam|ic-compl|
|000006d0| 65 74 65 2d 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 2d |ete-envi|ronment-|
|000006e0| 76 61 72 69 61 62 6c 65 | 20 73 68 65 6c 6c 2d 64 |variable| shell-d|
|000006f0| 79 6e 61 6d 69 63 2d 63 | 6f 6d 70 6c 65 74 65 2d |ynamic-c|omplete-|
|00000700| 63 6f 6d 6d 61 6e 64 20 | 73 68 65 6c 6c 2d 72 65 |command |shell-re|
|00000710| 70 6c 61 63 65 2d 62 79 | 2d 65 78 70 61 6e 64 65 |place-by|-expande|
|00000720| 64 2d 64 69 72 65 63 74 | 6f 72 79 20 63 6f 6d 69 |d-direct|ory comi|
|00000730| 6e 74 2d 64 79 6e 61 6d | 69 63 2d 63 6f 6d 70 6c |nt-dynam|ic-compl|
|00000740| 65 74 65 2d 66 69 6c 65 | 6e 61 6d 65 29 29 20 22 |ete-file|name)) "|
|00000750| 5c 0a 4c 69 73 74 20 6f | 66 20 66 75 6e 63 74 69 |\.List o|f functi|
|00000760| 6f 6e 73 20 63 61 6c 6c | 65 64 20 74 6f 20 70 65 |ons call|ed to pe|
|00000770| 72 66 6f 72 6d 20 63 6f | 6d 70 6c 65 74 69 6f 6e |rform co|mpletion|
|00000780| 2e 0a 54 68 69 73 20 76 | 61 72 69 61 62 6c 65 20 |..This v|ariable |
|00000790| 69 73 20 75 73 65 64 20 | 74 6f 20 69 6e 69 74 69 |is used |to initi|
|000007a0| 61 6c 69 73 65 20 60 63 | 6f 6d 69 6e 74 2d 64 79 |alise `c|omint-dy|
|000007b0| 6e 61 6d 69 63 2d 63 6f | 6d 70 6c 65 74 65 2d 66 |namic-co|mplete-f|
|000007c0| 75 6e 63 74 69 6f 6e 73 | 27 20 69 6e 20 74 68 65 |unctions|' in the|
|000007d0| 0a 73 68 65 6c 6c 20 62 | 75 66 66 65 72 2e 0a 0a |.shell b|uffer...|
|000007e0| 54 68 69 73 20 69 73 20 | 61 20 66 69 6e 65 20 74 |This is |a fine t|
|000007f0| 68 69 6e 67 20 74 6f 20 | 73 65 74 20 69 6e 20 79 |hing to |set in y|
|00000800| 6f 75 72 20 60 2e 65 6d | 61 63 73 27 20 66 69 6c |our `.em|acs' fil|
|00000810| 65 2e 22 29 0a 28 64 65 | 66 76 61 72 20 73 68 65 |e.").(de|fvar she|
|00000820| 6c 6c 2d 63 6f 6d 6d 61 | 6e 64 2d 72 65 67 65 78 |ll-comma|nd-regex|
|00000830| 70 20 22 5c 5c 28 28 2e | 2a 29 5c 5c 7c 5b 5e 3b |p "\\((.|*)\\|[^;|
|00000840| 26 7c 5d 5c 5c 29 2b 22 | 20 22 5c 0a 2a 52 65 67 |&|]\\)+"| "\.*Reg|
|00000850| 65 78 70 20 74 6f 20 6d | 61 74 63 68 20 73 68 65 |exp to m|atch she|
|00000860| 6c 6c 20 63 6f 6d 6d 61 | 6e 64 73 2e 0a 45 6c 65 |ll comma|nds..Ele|
|00000870| 6d 65 6e 74 73 20 6f 66 | 20 70 69 70 65 73 20 61 |ments of| pipes a|
|00000880| 72 65 20 63 6f 6e 73 69 | 64 65 72 65 64 20 61 73 |re consi|dered as|
|00000890| 20 73 65 70 61 72 61 74 | 65 20 63 6f 6d 6d 61 6e | separat|e comman|
|000008a0| 64 73 2c 20 66 6f 72 6b | 73 20 61 6e 64 20 72 65 |ds, fork|s and re|
|000008b0| 64 69 72 65 63 74 69 6f | 6e 73 0a 61 73 20 70 61 |directio|ns.as pa|
|000008c0| 72 74 20 6f 66 20 6f 6e | 65 20 63 6f 6d 6d 61 6e |rt of on|e comman|
|000008d0| 64 2e 22 29 0a 28 64 65 | 66 76 61 72 20 73 68 65 |d.").(de|fvar she|
|000008e0| 6c 6c 2d 63 6f 6d 70 6c | 65 74 69 6f 6e 2d 65 78 |ll-compl|etion-ex|
|000008f0| 65 63 6f 6e 6c 79 20 74 | 20 22 5c 0a 2a 49 66 20 |econly t| "\.*If |
|00000900| 6e 6f 6e 2d 6e 69 6c 2c | 20 75 73 65 20 65 78 65 |non-nil,| use exe|
|00000910| 63 75 74 61 62 6c 65 20 | 66 69 6c 65 73 20 6f 6e |cutable |files on|
|00000920| 6c 79 20 66 6f 72 20 63 | 6f 6d 70 6c 65 74 69 6f |ly for c|ompletio|
|00000930| 6e 20 63 61 6e 64 69 64 | 61 74 65 73 2e 0a 54 68 |n candid|ates..Th|
|00000940| 69 73 20 6d 69 72 72 6f | 72 73 20 74 68 65 20 6f |is mirro|rs the o|
|00000950| 70 74 69 6f 6e 61 6c 20 | 62 65 68 61 76 69 6f 72 |ptional |behavior|
|00000960| 20 6f 66 20 74 63 73 68 | 2e 0a 0a 44 65 74 65 63 | of tcsh|...Detec|
|00000970| 74 69 6e 67 20 65 78 65 | 63 75 74 61 62 69 6c 69 |ting exe|cutabili|
|00000980| 74 79 20 6f 66 20 66 69 | 6c 65 73 20 6d 61 79 20 |ty of fi|les may |
|00000990| 73 6c 6f 77 20 63 6f 6d | 6d 61 6e 64 20 63 6f 6d |slow com|mand com|
|000009a0| 70 6c 65 74 69 6f 6e 20 | 63 6f 6e 73 69 64 65 72 |pletion |consider|
|000009b0| 61 62 6c 79 2e 22 29 0a | 28 64 65 66 76 61 72 20 |ably.").|(defvar |
|000009c0| 73 68 65 6c 6c 2d 70 6f | 70 64 2d 72 65 67 65 78 |shell-po|pd-regex|
|000009d0| 70 20 22 70 6f 70 64 22 | 20 22 5c 0a 2a 52 65 67 |p "popd"| "\.*Reg|
|000009e0| 65 78 70 20 74 6f 20 6d | 61 74 63 68 20 73 75 62 |exp to m|atch sub|
|000009f0| 73 68 65 6c 6c 20 63 6f | 6d 6d 61 6e 64 73 20 65 |shell co|mmands e|
|00000a00| 71 75 69 76 61 6c 65 6e | 74 20 74 6f 20 70 6f 70 |quivalen|t to pop|
|00000a10| 64 2e 22 29 0a 28 64 65 | 66 76 61 72 20 73 68 65 |d.").(de|fvar she|
|00000a20| 6c 6c 2d 70 75 73 68 64 | 2d 72 65 67 65 78 70 20 |ll-pushd|-regexp |
|00000a30| 22 70 75 73 68 64 22 20 | 22 5c 0a 2a 52 65 67 65 |"pushd" |"\.*Rege|
|00000a40| 78 70 20 74 6f 20 6d 61 | 74 63 68 20 73 75 62 73 |xp to ma|tch subs|
|00000a50| 68 65 6c 6c 20 63 6f 6d | 6d 61 6e 64 73 20 65 71 |hell com|mands eq|
|00000a60| 75 69 76 61 6c 65 6e 74 | 20 74 6f 20 70 75 73 68 |uivalent| to push|
|00000a70| 64 2e 22 29 0a 28 64 65 | 66 76 61 72 20 73 68 65 |d.").(de|fvar she|
|00000a80| 6c 6c 2d 70 75 73 68 64 | 2d 74 6f 68 6f 6d 65 20 |ll-pushd|-tohome |
|00000a90| 6e 69 6c 20 22 5c 0a 2a | 49 66 20 6e 6f 6e 2d 6e |nil "\.*|If non-n|
|00000aa0| 69 6c 2c 20 6d 61 6b 65 | 20 70 75 73 68 64 20 77 |il, make| pushd w|
|00000ab0| 69 74 68 20 6e 6f 20 61 | 72 67 20 62 65 68 61 76 |ith no a|rg behav|
|00000ac0| 65 20 61 73 20 5c 22 70 | 75 73 68 64 20 7e 5c 22 |e as \"p|ushd ~\"|
|00000ad0| 20 28 6c 69 6b 65 20 63 | 64 29 2e 0a 54 68 69 73 | (like c|d)..This|
|00000ae0| 20 6d 69 72 72 6f 72 73 | 20 74 68 65 20 6f 70 74 | mirrors| the opt|
|00000af0| 69 6f 6e 61 6c 20 62 65 | 68 61 76 69 6f 72 20 6f |ional be|havior o|
|00000b00| 66 20 74 63 73 68 2e 22 | 29 0a 28 64 65 66 76 61 |f tcsh."|).(defva|
|00000b10| 72 20 73 68 65 6c 6c 2d | 70 75 73 68 64 2d 64 65 |r shell-|pushd-de|
|00000b20| 78 74 72 61 63 74 20 6e | 69 6c 20 22 5c 0a 2a 49 |xtract n|il "\.*I|
|00000b30| 66 20 6e 6f 6e 2d 6e 69 | 6c 2c 20 6d 61 6b 65 20 |f non-ni|l, make |
|00000b40| 5c 22 70 75 73 68 64 20 | 2b 6e 5c 22 20 70 6f 70 |\"pushd |+n\" pop|
|00000b50| 20 74 68 65 20 6e 74 68 | 20 64 69 72 20 74 6f 20 | the nth| dir to |
|00000b60| 74 68 65 20 73 74 61 63 | 6b 20 74 6f 70 2e 0a 54 |the stac|k top..T|
|00000b70| 68 69 73 20 6d 69 72 72 | 6f 72 73 20 74 68 65 20 |his mirr|ors the |
|00000b80| 6f 70 74 69 6f 6e 61 6c | 20 62 65 68 61 76 69 6f |optional| behavio|
|00000b90| 72 20 6f 66 20 74 63 73 | 68 2e 22 29 0a 28 64 65 |r of tcs|h.").(de|
|00000ba0| 66 76 61 72 20 73 68 65 | 6c 6c 2d 70 75 73 68 64 |fvar she|ll-pushd|
|00000bb0| 2d 64 75 6e 69 71 75 65 | 20 6e 69 6c 20 22 5c 0a |-dunique| nil "\.|
|00000bc0| 2a 49 66 20 6e 6f 6e 2d | 6e 69 6c 2c 20 6d 61 6b |*If non-|nil, mak|
|00000bd0| 65 20 70 75 73 68 64 20 | 6f 6e 6c 79 20 61 64 64 |e pushd |only add|
|00000be0| 20 75 6e 69 71 75 65 20 | 64 69 72 65 63 74 6f 72 | unique |director|
|00000bf0| 69 65 73 20 74 6f 20 74 | 68 65 20 73 74 61 63 6b |ies to t|he stack|
|00000c00| 2e 0a 54 68 69 73 20 6d | 69 72 72 6f 72 73 20 74 |..This m|irrors t|
|00000c10| 68 65 20 6f 70 74 69 6f | 6e 61 6c 20 62 65 68 61 |he optio|nal beha|
|00000c20| 76 69 6f 72 20 6f 66 20 | 74 63 73 68 2e 22 29 0a |vior of |tcsh.").|
|00000c30| 28 64 65 66 76 61 72 20 | 73 68 65 6c 6c 2d 63 64 |(defvar |shell-cd|
|00000c40| 2d 72 65 67 65 78 70 20 | 22 63 64 22 20 22 5c 0a |-regexp |"cd" "\.|
|00000c50| 2a 52 65 67 65 78 70 20 | 74 6f 20 6d 61 74 63 68 |*Regexp |to match|
|00000c60| 20 73 75 62 73 68 65 6c | 6c 20 63 6f 6d 6d 61 6e | subshel|l comman|
|00000c70| 64 73 20 65 71 75 69 76 | 61 6c 65 6e 74 20 74 6f |ds equiv|alent to|
|00000c80| 20 63 64 2e 22 29 0a 28 | 64 65 66 76 61 72 20 65 | cd.").(|defvar e|
|00000c90| 78 70 6c 69 63 69 74 2d | 73 68 65 6c 6c 2d 66 69 |xplicit-|shell-fi|
|00000ca0| 6c 65 2d 6e 61 6d 65 20 | 6e 69 6c 20 22 5c 0a 2a |le-name |nil "\.*|
|00000cb0| 49 66 20 6e 6f 6e 2d 6e | 69 6c 2c 20 69 73 20 66 |If non-n|il, is f|
|00000cc0| 69 6c 65 20 6e 61 6d 65 | 20 74 6f 20 75 73 65 20 |ile name| to use |
|00000cd0| 66 6f 72 20 65 78 70 6c | 69 63 69 74 6c 79 20 72 |for expl|icitly r|
|00000ce0| 65 71 75 65 73 74 65 64 | 20 69 6e 66 65 72 69 6f |equested| inferio|
|00000cf0| 72 20 73 68 65 6c 6c 2e | 22 29 0a 28 64 65 66 76 |r shell.|").(defv|
|00000d00| 61 72 20 65 78 70 6c 69 | 63 69 74 2d 63 73 68 2d |ar expli|cit-csh-|
|00000d10| 61 72 67 73 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |args (by|te-code |
|00000d20| 22 08 c1 3d 83 08 00 c2 | 87 c3 87 22 20 5b 73 79 |"..=....|..." [sy|
|00000d30| 73 74 65 6d 2d 74 79 70 | 65 20 68 70 75 78 20 28 |stem-typ|e hpux (|
|00000d40| 22 2d 69 22 20 22 2d 54 | 22 29 20 28 22 2d 69 22 |"-i" "-T|") ("-i"|
|00000d50| 29 5d 20 32 29 20 22 5c | 0a 2a 41 72 67 73 20 70 |)] 2) "\|.*Args p|
|00000d60| 61 73 73 65 64 20 74 6f | 20 69 6e 66 65 72 69 6f |assed to| inferio|
|00000d70| 72 20 73 68 65 6c 6c 20 | 62 79 20 4d 2d 78 20 73 |r shell |by M-x s|
|00000d80| 68 65 6c 6c 2c 20 69 66 | 20 74 68 65 20 73 68 65 |hell, if| the she|
|00000d90| 6c 6c 20 69 73 20 63 73 | 68 2e 0a 56 61 6c 75 65 |ll is cs|h..Value|
|00000da0| 20 69 73 20 61 20 6c 69 | 73 74 20 6f 66 20 73 74 | is a li|st of st|
|00000db0| 72 69 6e 67 73 2c 20 77 | 68 69 63 68 20 6d 61 79 |rings, w|hich may|
|00000dc0| 20 62 65 20 6e 69 6c 2e | 22 29 0a 28 64 65 66 76 | be nil.|").(defv|
|00000dd0| 61 72 20 73 68 65 6c 6c | 2d 69 6e 70 75 74 2d 61 |ar shell|-input-a|
|00000de0| 75 74 6f 65 78 70 61 6e | 64 20 28 71 75 6f 74 65 |utoexpan|d (quote|
|00000df0| 20 68 69 73 74 6f 72 79 | 29 20 22 5c 0a 2a 49 66 | history|) "\.*If|
|00000e00| 20 6e 6f 6e 2d 6e 69 6c | 2c 20 65 78 70 61 6e 64 | non-nil|, expand|
|00000e10| 20 69 6e 70 75 74 20 63 | 6f 6d 6d 61 6e 64 20 68 | input c|ommand h|
|00000e20| 69 73 74 6f 72 79 20 72 | 65 66 65 72 65 6e 63 65 |istory r|eference|
|00000e30| 73 20 6f 6e 20 63 6f 6d | 70 6c 65 74 69 6f 6e 2e |s on com|pletion.|
|00000e40| 0a 54 68 69 73 20 6d 69 | 72 72 6f 72 73 20 74 68 |.This mi|rrors th|
|00000e50| 65 20 6f 70 74 69 6f 6e | 61 6c 20 62 65 68 61 76 |e option|al behav|
|00000e60| 69 6f 72 20 6f 66 20 74 | 63 73 68 20 28 69 74 73 |ior of t|csh (its|
|00000e70| 20 61 75 74 6f 65 78 70 | 61 6e 64 20 61 6e 64 20 | autoexp|and and |
|00000e80| 68 69 73 74 6c 69 74 29 | 2e 0a 0a 49 66 20 74 68 |histlit)|...If th|
|00000e90| 65 20 76 61 6c 75 65 20 | 69 73 20 60 69 6e 70 75 |e value |is `inpu|
|00000ea0| 74 27 2c 20 74 68 65 6e | 20 74 68 65 20 65 78 70 |t', then| the exp|
|00000eb0| 61 6e 73 69 6f 6e 20 69 | 73 20 73 65 65 6e 20 6f |ansion i|s seen o|
|00000ec0| 6e 20 69 6e 70 75 74 2e | 0a 49 66 20 74 68 65 20 |n input.|.If the |
|00000ed0| 76 61 6c 75 65 20 69 73 | 20 60 68 69 73 74 6f 72 |value is| `histor|
|00000ee0| 79 27 2c 20 74 68 65 6e | 20 74 68 65 20 65 78 70 |y', then| the exp|
|00000ef0| 61 6e 73 69 6f 6e 20 69 | 73 20 6f 6e 6c 79 20 77 |ansion i|s only w|
|00000f00| 68 65 6e 20 69 6e 73 65 | 72 74 69 6e 67 0a 69 6e |hen inse|rting.in|
|00000f10| 74 6f 20 74 68 65 20 62 | 75 66 66 65 72 27 73 20 |to the b|uffer's |
|00000f20| 69 6e 70 75 74 20 72 69 | 6e 67 2e 20 20 53 65 65 |input ri|ng. See|
|00000f30| 20 61 6c 73 6f 20 60 63 | 6f 6d 69 6e 74 2d 6d 61 | also `c|omint-ma|
|00000f40| 67 69 63 2d 73 70 61 63 | 65 27 20 61 6e 64 0a 60 |gic-spac|e' and.`|
|00000f50| 63 6f 6d 69 6e 74 2d 64 | 79 6e 61 6d 69 63 2d 63 |comint-d|ynamic-c|
|00000f60| 6f 6d 70 6c 65 74 65 27 | 2e 0a 0a 54 68 69 73 20 |omplete'|...This |
|00000f70| 76 61 72 69 61 62 6c 65 | 20 73 75 70 70 6c 69 65 |variable| supplie|
|00000f80| 73 20 61 20 64 65 66 61 | 75 6c 74 20 66 6f 72 20 |s a defa|ult for |
|00000f90| 60 63 6f 6d 69 6e 74 2d | 69 6e 70 75 74 2d 61 75 |`comint-|input-au|
|00000fa0| 74 6f 65 78 70 61 6e 64 | 27 2c 0a 66 6f 72 20 53 |toexpand|',.for S|
|00000fb0| 68 65 6c 6c 20 6d 6f 64 | 65 20 6f 6e 6c 79 2e 22 |hell mod|e only."|
|00000fc0| 29 0a 28 64 65 66 76 61 | 72 20 73 68 65 6c 6c 2d |).(defva|r shell-|
|00000fd0| 64 69 72 73 74 61 63 6b | 20 6e 69 6c 20 22 5c 0a |dirstack| nil "\.|
|00000fe0| 4c 69 73 74 20 6f 66 20 | 64 69 72 65 63 74 6f 72 |List of |director|
|00000ff0| 69 65 73 20 73 61 76 65 | 64 20 62 79 20 70 75 73 |ies save|d by pus|
|00001000| 68 64 20 69 6e 20 74 68 | 69 73 20 62 75 66 66 65 |hd in th|is buffe|
|00001010| 72 27 73 20 73 68 65 6c | 6c 2e 0a 54 68 75 73 2c |r's shel|l..Thus,|
|00001020| 20 74 68 69 73 20 64 6f | 65 73 20 6e 6f 74 20 69 | this do|es not i|
|00001030| 6e 63 6c 75 64 65 20 74 | 68 65 20 73 68 65 6c 6c |nclude t|he shell|
|00001040| 27 73 20 63 75 72 72 65 | 6e 74 20 64 69 72 65 63 |'s curre|nt direc|
|00001050| 74 6f 72 79 2e 22 29 0a | 28 64 65 66 76 61 72 20 |tory.").|(defvar |
|00001060| 73 68 65 6c 6c 2d 64 69 | 72 74 72 61 63 6b 70 20 |shell-di|rtrackp |
|00001070| 74 20 22 5c 0a 4e 6f 6e | 2d 6e 69 6c 20 69 6e 20 |t "\.Non|-nil in |
|00001080| 61 20 73 68 65 6c 6c 20 | 62 75 66 66 65 72 20 6d |a shell |buffer m|
|00001090| 65 61 6e 73 20 64 69 72 | 65 63 74 6f 72 79 20 74 |eans dir|ectory t|
|000010a0| 72 61 63 6b 69 6e 67 20 | 69 73 20 65 6e 61 62 6c |racking |is enabl|
|000010b0| 65 64 2e 22 29 0a 28 64 | 65 66 76 61 72 20 73 68 |ed.").(d|efvar sh|
|000010c0| 65 6c 6c 2d 6c 61 73 74 | 2d 64 69 72 20 6e 69 6c |ell-last|-dir nil|
|000010d0| 20 22 5c 0a 4b 65 65 70 | 20 74 72 61 63 6b 20 6f | "\.Keep| track o|
|000010e0| 66 20 6c 61 73 74 20 64 | 69 72 65 63 74 6f 72 79 |f last d|irectory|
|000010f0| 20 66 6f 72 20 6b 73 68 | 20 60 63 64 20 2d 27 20 | for ksh| `cd -' |
|00001100| 63 6f 6d 6d 61 6e 64 2e | 22 29 0a 28 64 65 66 76 |command.|").(defv|
|00001110| 61 72 20 73 68 65 6c 6c | 2d 64 69 72 73 74 61 63 |ar shell|-dirstac|
|00001120| 6b 2d 71 75 65 72 79 20 | 6e 69 6c 20 22 5c 0a 43 |k-query |nil "\.C|
|00001130| 6f 6d 6d 61 6e 64 20 75 | 73 65 64 20 62 79 20 60 |ommand u|sed by `|
|00001140| 73 68 65 6c 6c 2d 72 65 | 73 79 6e 63 2d 64 69 72 |shell-re|sync-dir|
|00001150| 27 20 74 6f 20 71 75 65 | 72 79 20 74 68 65 20 73 |' to que|ry the s|
|00001160| 68 65 6c 6c 2e 22 29 0a | 28 62 79 74 65 2d 63 6f |hell.").|(byte-co|
|00001170| 64 65 20 22 c0 c1 21 84 | 08 00 c2 11 09 84 3c 00 |de "..!.|......<.|
|00001180| c3 5c 66 21 11 c5 09 c6 | c7 23 88 c5 09 c8 c9 23 |.\f!....|.#.....#|
|00001190| 88 c5 09 ca cb 23 88 c5 | 09 cc cd 23 88 ce cf 09 |.....#..|...#....|
|000011a0| d0 5c 22 d1 d2 d3 24 88 | ce cf 09 d4 5c 22 d5 d6 |.\"...$.|....\"..|
|000011b0| d7 24 88 c2 87 22 20 5b | 62 6f 75 6e 64 70 20 73 |.$..." [|boundp s|
|000011c0| 68 65 6c 6c 2d 6d 6f 64 | 65 2d 6d 61 70 20 6e 69 |hell-mod|e-map ni|
|000011d0| 6c 20 63 6f 70 79 2d 6b | 65 79 6d 61 70 20 63 6f |l copy-k|eymap co|
|000011e0| 6d 69 6e 74 2d 6d 6f 64 | 65 2d 6d 61 70 20 64 65 |mint-mod|e-map de|
|000011f0| 66 69 6e 65 2d 6b 65 79 | 20 22 03 06 22 20 73 68 |fine-key| ".." sh|
|00001200| 65 6c 6c 2d 66 6f 72 77 | 61 72 64 2d 63 6f 6d 6d |ell-forw|ard-comm|
|00001210| 61 6e 64 20 22 03 02 22 | 20 73 68 65 6c 6c 2d 62 |and ".."| shell-b|
|00001220| 61 63 6b 77 61 72 64 2d | 63 6f 6d 6d 61 6e 64 20 |ackward-|command |
|00001230| 22 09 22 20 63 6f 6d 69 | 6e 74 2d 64 79 6e 61 6d |"." comi|nt-dynam|
|00001240| 69 63 2d 63 6f 6d 70 6c | 65 74 65 20 22 bf 22 20 |ic-compl|ete "." |
|00001250| 63 6f 6d 69 6e 74 2d 64 | 79 6e 61 6d 69 63 2d 6c |comint-d|ynamic-l|
|00001260| 69 73 74 2d 66 69 6c 65 | 6e 61 6d 65 2d 63 6f 6d |ist-file|name-com|
|00001270| 70 6c 65 74 69 6f 6e 73 | 20 64 65 66 69 6e 65 2d |pletions| define-|
|00001280| 6b 65 79 2d 61 66 74 65 | 72 20 6c 6f 6f 6b 75 70 |key-afte|r lookup|
|00001290| 2d 6b 65 79 20 5b 6d 65 | 6e 75 2d 62 61 72 20 63 |-key [me|nu-bar c|
|000012a0| 6f 6d 70 6c 65 74 69 6f | 6e 5d 20 5b 63 6f 6d 70 |ompletio|n] [comp|
|000012b0| 6c 65 74 65 2d 65 6e 76 | 2d 76 61 72 69 61 62 6c |lete-env|-variabl|
|000012c0| 65 5d 20 28 22 43 6f 6d | 70 6c 65 74 65 20 45 6e |e] ("Com|plete En|
|000012d0| 76 2e 20 56 61 72 69 61 | 62 6c 65 20 4e 61 6d 65 |v. Varia|ble Name|
|000012e0| 22 20 2e 20 73 68 65 6c | 6c 2d 64 79 6e 61 6d 69 |" . shel|l-dynami|
|000012f0| 63 2d 63 6f 6d 70 6c 65 | 74 65 2d 65 6e 76 69 72 |c-comple|te-envir|
|00001300| 6f 6e 6d 65 6e 74 2d 76 | 61 72 69 61 62 6c 65 29 |onment-v|ariable)|
|00001310| 20 63 6f 6d 70 6c 65 74 | 65 2d 66 69 6c 65 20 5b | complet|e-file [|
|00001320| 6d 65 6e 75 2d 62 61 72 | 20 63 6f 6d 70 6c 65 74 |menu-bar| complet|
|00001330| 69 6f 6e 5d 20 5b 65 78 | 70 61 6e 64 2d 64 69 72 |ion] [ex|pand-dir|
|00001340| 65 63 74 6f 72 79 5d 20 | 28 22 45 78 70 61 6e 64 |ectory] |("Expand|
|00001350| 20 44 69 72 65 63 74 6f | 72 79 20 52 65 66 65 72 | Directo|ry Refer|
|00001360| 65 6e 63 65 22 20 2e 20 | 73 68 65 6c 6c 2d 72 65 |ence" . |shell-re|
|00001370| 70 6c 61 63 65 2d 62 79 | 2d 65 78 70 61 6e 64 65 |place-by|-expande|
|00001380| 64 2d 64 69 72 65 63 74 | 6f 72 79 29 20 63 6f 6d |d-direct|ory) com|
|00001390| 70 6c 65 74 65 2d 65 78 | 70 61 6e 64 5d 20 35 29 |plete-ex|pand] 5)|
|000013a0| 0a 28 64 65 66 76 61 72 | 20 73 68 65 6c 6c 2d 6d |.(defvar| shell-m|
|000013b0| 6f 64 65 2d 68 6f 6f 6b | 20 6e 69 6c 20 22 5c 0a |ode-hook| nil "\.|
|000013c0| 2a 48 6f 6f 6b 20 66 6f | 72 20 63 75 73 74 6f 6d |*Hook fo|r custom|
|000013d0| 69 73 69 6e 67 20 53 68 | 65 6c 6c 20 6d 6f 64 65 |ising Sh|ell mode|
|000013e0| 2e 22 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 73 |.").(def|alias 's|
|000013f0| 68 65 6c 6c 2d 6d 6f 64 | 65 20 23 5b 6e 69 6c 20 |hell-mod|e #[nil |
|00001400| 22 c0 20 88 c1 12 c3 14 | c5 0e 06 21 88 0e 07 16 |". .....|...!....|
|00001410| 08 0e 09 16 5c 6e 0e 0b | 16 5c 66 0e 0d 16 0e cf |....\n..|.\f.....|
|00001420| d0 21 88 0e 08 16 10 cf | d1 21 88 d2 16 11 d2 16 |.!......|.!......|
|00001430| 13 cf d4 21 88 d5 16 14 | d6 d7 d8 5c 22 88 0e 19 |...!....|...\"...|
|00001440| 16 1a db dc dd 70 21 21 | 40 21 1e 1e df e0 21 86 |.....p!!|@!....!.|
|00001450| 65 00 0e 1e e1 98 83 59 | 00 e2 82 65 00 0e 1e e3 |e......Y|...e....|
|00001460| 98 83 64 00 e4 82 65 00 | e5 16 26 e7 e8 0e 1e 5c |..d...e.|..&....\|
|00001470| 22 83 73 00 e9 82 74 00 | ea 16 2b 29 ec ed 21 88 |".s...t.|..+)..!.|
|00001480| ee d5 21 87 22 20 5b 63 | 6f 6d 69 6e 74 2d 6d 6f |..!." [c|omint-mo|
|00001490| 64 65 20 73 68 65 6c 6c | 2d 6d 6f 64 65 20 6d 61 |de shell|-mode ma|
|000014a0| 6a 6f 72 2d 6d 6f 64 65 | 20 22 53 68 65 6c 6c 22 |jor-mode| "Shell"|
|000014b0| 20 6d 6f 64 65 2d 6e 61 | 6d 65 20 75 73 65 2d 6c | mode-na|me use-l|
|000014c0| 6f 63 61 6c 2d 6d 61 70 | 20 73 68 65 6c 6c 2d 6d |ocal-map| shell-m|
|000014d0| 6f 64 65 2d 6d 61 70 20 | 73 68 65 6c 6c 2d 70 72 |ode-map |shell-pr|
|000014e0| 6f 6d 70 74 2d 70 61 74 | 74 65 72 6e 20 63 6f 6d |ompt-pat|tern com|
|000014f0| 69 6e 74 2d 70 72 6f 6d | 70 74 2d 72 65 67 65 78 |int-prom|pt-regex|
|00001500| 70 20 73 68 65 6c 6c 2d | 63 6f 6d 70 6c 65 74 69 |p shell-|completi|
|00001510| 6f 6e 2d 66 69 67 6e 6f | 72 65 20 63 6f 6d 69 6e |on-figno|re comin|
|00001520| 74 2d 63 6f 6d 70 6c 65 | 74 69 6f 6e 2d 66 69 67 |t-comple|tion-fig|
|00001530| 6e 6f 72 65 20 73 68 65 | 6c 6c 2d 64 65 6c 69 6d |nore she|ll-delim|
|00001540| 69 74 65 72 2d 61 72 67 | 75 6d 65 6e 74 2d 6c 69 |iter-arg|ument-li|
|00001550| 73 74 20 63 6f 6d 69 6e | 74 2d 64 65 6c 69 6d 69 |st comin|t-delimi|
|00001560| 74 65 72 2d 61 72 67 75 | 6d 65 6e 74 2d 6c 69 73 |ter-argu|ment-lis|
|00001570| 74 20 73 68 65 6c 6c 2d | 64 79 6e 61 6d 69 63 2d |t shell-|dynamic-|
|00001580| 63 6f 6d 70 6c 65 74 65 | 2d 66 75 6e 63 74 69 6f |complete|-functio|
|00001590| 6e 73 20 63 6f 6d 69 6e | 74 2d 64 79 6e 61 6d 69 |ns comin|t-dynami|
|000015a0| 63 2d 63 6f 6d 70 6c 65 | 74 65 2d 66 75 6e 63 74 |c-comple|te-funct|
|000015b0| 69 6f 6e 73 20 6d 61 6b | 65 2d 6c 6f 63 61 6c 2d |ions mak|e-local-|
|000015c0| 76 61 72 69 61 62 6c 65 | 20 70 61 72 61 67 72 61 |variable| paragra|
|000015d0| 70 68 2d 73 74 61 72 74 | 20 73 68 65 6c 6c 2d 64 |ph-start| shell-d|
|000015e0| 69 72 73 74 61 63 6b 20 | 6e 69 6c 20 73 68 65 6c |irstack |nil shel|
|000015f0| 6c 2d 6c 61 73 74 2d 64 | 69 72 20 73 68 65 6c 6c |l-last-d|ir shell|
|00001600| 2d 64 69 72 74 72 61 63 | 6b 70 20 74 20 61 64 64 |-dirtrac|kp t add|
|00001610| 2d 68 6f 6f 6b 20 63 6f | 6d 69 6e 74 2d 69 6e 70 |-hook co|mint-inp|
|00001620| 75 74 2d 66 69 6c 74 65 | 72 2d 66 75 6e 63 74 69 |ut-filte|r-functi|
|00001630| 6f 6e 73 20 73 68 65 6c | 6c 2d 64 69 72 65 63 74 |ons shel|l-direct|
|00001640| 6f 72 79 2d 74 72 61 63 | 6b 65 72 20 73 68 65 6c |ory-trac|ker shel|
|00001650| 6c 2d 69 6e 70 75 74 2d | 61 75 74 6f 65 78 70 61 |l-input-|autoexpa|
|00001660| 6e 64 20 63 6f 6d 69 6e | 74 2d 69 6e 70 75 74 2d |nd comin|t-input-|
|00001670| 61 75 74 6f 65 78 70 61 | 6e 64 20 66 69 6c 65 2d |autoexpa|nd file-|
|00001680| 6e 61 6d 65 2d 6e 6f 6e | 64 69 72 65 63 74 6f 72 |name-non|director|
|00001690| 79 20 70 72 6f 63 65 73 | 73 2d 63 6f 6d 6d 61 6e |y proces|s-comman|
|000016a0| 64 20 67 65 74 2d 62 75 | 66 66 65 72 2d 70 72 6f |d get-bu|ffer-pro|
|000016b0| 63 65 73 73 20 73 68 65 | 6c 6c 20 67 65 74 65 6e |cess she|ll geten|
|000016c0| 76 20 22 48 49 53 54 46 | 49 4c 45 22 20 22 62 61 |v "HISTF|ILE" "ba|
|000016d0| 73 68 22 20 22 7e 2f 2e | 62 61 73 68 5f 68 69 73 |sh" "~/.|bash_his|
|000016e0| 74 6f 72 79 22 20 22 6b | 73 68 22 20 22 7e 2f 2e |tory" "k|sh" "~/.|
|000016f0| 73 68 5f 68 69 73 74 6f | 72 79 22 20 22 7e 2f 2e |sh_histo|ry" "~/.|
|00001700| 68 69 73 74 6f 72 79 22 | 20 63 6f 6d 69 6e 74 2d |history"| comint-|
|00001710| 69 6e 70 75 74 2d 72 69 | 6e 67 2d 66 69 6c 65 2d |input-ri|ng-file-|
|00001720| 6e 61 6d 65 20 73 74 72 | 69 6e 67 2d 6d 61 74 63 |name str|ing-matc|
|00001730| 68 20 22 5e 6b 3f 73 68 | 24 22 20 22 70 77 64 22 |h "^k?sh|$" "pwd"|
|00001740| 20 22 64 69 72 73 22 20 | 73 68 65 6c 6c 2d 64 69 | "dirs" |shell-di|
|00001750| 72 73 74 61 63 6b 2d 71 | 75 65 72 79 20 72 75 6e |rstack-q|uery run|
|00001760| 2d 68 6f 6f 6b 73 20 73 | 68 65 6c 6c 2d 6d 6f 64 |-hooks s|hell-mod|
|00001770| 65 2d 68 6f 6f 6b 20 63 | 6f 6d 69 6e 74 2d 72 65 |e-hook c|omint-re|
|00001780| 61 64 2d 69 6e 70 75 74 | 2d 72 69 6e 67 5d 20 34 |ad-input|-ring] 4|
|00001790| 20 22 5c 0a 4d 61 6a 6f | 72 20 6d 6f 64 65 20 66 | "\.Majo|r mode f|
|000017a0| 6f 72 20 69 6e 74 65 72 | 61 63 74 69 6e 67 20 77 |or inter|acting w|
|000017b0| 69 74 68 20 61 6e 20 69 | 6e 66 65 72 69 6f 72 20 |ith an i|nferior |
|000017c0| 73 68 65 6c 6c 2e 0a 52 | 65 74 75 72 6e 20 61 66 |shell..R|eturn af|
|000017d0| 74 65 72 20 74 68 65 20 | 65 6e 64 20 6f 66 20 74 |ter the |end of t|
|000017e0| 68 65 20 70 72 6f 63 65 | 73 73 27 20 6f 75 74 70 |he proce|ss' outp|
|000017f0| 75 74 20 73 65 6e 64 73 | 20 74 68 65 20 74 65 78 |ut sends| the tex|
|00001800| 74 20 66 72 6f 6d 20 74 | 68 65 20 0a 20 20 20 20 |t from t|he . |
|00001810| 65 6e 64 20 6f 66 20 70 | 72 6f 63 65 73 73 20 74 |end of p|rocess t|
|00001820| 6f 20 74 68 65 20 65 6e | 64 20 6f 66 20 74 68 65 |o the en|d of the|
|00001830| 20 63 75 72 72 65 6e 74 | 20 6c 69 6e 65 2e 0a 52 | current| line..R|
|00001840| 65 74 75 72 6e 20 62 65 | 66 6f 72 65 20 65 6e 64 |eturn be|fore end|
|00001850| 20 6f 66 20 70 72 6f 63 | 65 73 73 20 6f 75 74 70 | of proc|ess outp|
|00001860| 75 74 20 63 6f 70 69 65 | 73 20 74 68 65 20 63 75 |ut copie|s the cu|
|00001870| 72 72 65 6e 74 20 6c 69 | 6e 65 20 28 65 78 63 65 |rrent li|ne (exce|
|00001880| 70 74 0a 20 20 20 20 66 | 6f 72 20 74 68 65 20 70 |pt. f|or the p|
|00001890| 72 6f 6d 70 74 29 20 74 | 6f 20 74 68 65 20 65 6e |rompt) t|o the en|
|000018a0| 64 20 6f 66 20 74 68 65 | 20 62 75 66 66 65 72 20 |d of the| buffer |
|000018b0| 61 6e 64 20 73 65 6e 64 | 73 20 69 74 2e 0a 4d 2d |and send|s it..M-|
|000018c0| 78 20 73 65 6e 64 2d 69 | 6e 76 69 73 69 62 6c 65 |x send-i|nvisible|
|000018d0| 20 72 65 61 64 73 20 61 | 20 6c 69 6e 65 20 6f 66 | reads a| line of|
|000018e0| 20 74 65 78 74 20 77 69 | 74 68 6f 75 74 20 65 63 | text wi|thout ec|
|000018f0| 68 6f 69 6e 67 20 69 74 | 2c 20 61 6e 64 20 73 65 |hoing it|, and se|
|00001900| 6e 64 73 20 69 74 20 74 | 6f 0a 20 20 20 20 74 68 |nds it t|o. th|
|00001910| 65 20 73 68 65 6c 6c 2e | 20 20 54 68 69 73 20 69 |e shell.| This i|
|00001920| 73 20 75 73 65 66 75 6c | 20 66 6f 72 20 65 6e 74 |s useful| for ent|
|00001930| 65 72 69 6e 67 20 70 61 | 73 73 77 6f 72 64 73 2e |ering pa|sswords.|
|00001940| 20 20 4f 72 2c 20 61 64 | 64 20 74 68 65 20 66 75 | Or, ad|d the fu|
|00001950| 6e 63 74 69 6f 6e 0a 20 | 20 20 20 60 63 6f 6d 69 |nction. | `comi|
|00001960| 6e 74 2d 77 61 74 63 68 | 2d 66 6f 72 2d 70 61 73 |nt-watch|-for-pas|
|00001970| 73 77 6f 72 64 2d 70 72 | 6f 6d 70 74 27 20 74 6f |sword-pr|ompt' to|
|00001980| 20 60 63 6f 6d 69 6e 74 | 2d 6f 75 74 70 75 74 2d | `comint|-output-|
|00001990| 66 69 6c 74 65 72 2d 66 | 75 6e 63 74 69 6f 6e 73 |filter-f|unctions|
|000019a0| 27 2e 0a 0a 49 66 20 79 | 6f 75 20 61 63 63 69 64 |'...If y|ou accid|
|000019b0| 65 6e 74 61 6c 6c 79 20 | 73 75 73 70 65 6e 64 20 |entally |suspend |
|000019c0| 79 6f 75 72 20 70 72 6f | 63 65 73 73 2c 20 75 73 |your pro|cess, us|
|000019d0| 65 20 5c 5c 5b 63 6f 6d | 69 6e 74 2d 63 6f 6e 74 |e \\[com|int-cont|
|000019e0| 69 6e 75 65 2d 73 75 62 | 6a 6f 62 5d 0a 74 6f 20 |inue-sub|job].to |
|000019f0| 63 6f 6e 74 69 6e 75 65 | 20 69 74 2e 0a 0a 63 64 |continue| it...cd|
|00001a00| 2c 20 70 75 73 68 64 20 | 61 6e 64 20 70 6f 70 64 |, pushd |and popd|
|00001a10| 20 63 6f 6d 6d 61 6e 64 | 73 20 67 69 76 65 6e 20 | command|s given |
|00001a20| 74 6f 20 74 68 65 20 73 | 68 65 6c 6c 20 61 72 65 |to the s|hell are|
|00001a30| 20 77 61 74 63 68 65 64 | 20 62 79 20 45 6d 61 63 | watched| by Emac|
|00001a40| 73 20 74 6f 20 6b 65 65 | 70 0a 74 68 69 73 20 62 |s to kee|p.this b|
|00001a50| 75 66 66 65 72 27 73 20 | 64 65 66 61 75 6c 74 20 |uffer's |default |
|00001a60| 64 69 72 65 63 74 6f 72 | 79 20 74 68 65 20 73 61 |director|y the sa|
|00001a70| 6d 65 20 61 73 20 74 68 | 65 20 73 68 65 6c 6c 27 |me as th|e shell'|
|00001a80| 73 20 77 6f 72 6b 69 6e | 67 20 64 69 72 65 63 74 |s workin|g direct|
|00001a90| 6f 72 79 2e 0a 4d 2d 78 | 20 64 69 72 73 20 71 75 |ory..M-x| dirs qu|
|00001aa0| 65 72 69 65 73 20 74 68 | 65 20 73 68 65 6c 6c 20 |eries th|e shell |
|00001ab0| 61 6e 64 20 72 65 73 79 | 6e 63 73 20 45 6d 61 63 |and resy|ncs Emac|
|00001ac0| 73 27 20 69 64 65 61 20 | 6f 66 20 77 68 61 74 20 |s' idea |of what |
|00001ad0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 0a 20 20 20 |the curr|ent . |
|00001ae0| 20 64 69 72 65 63 74 6f | 72 79 20 73 74 61 63 6b | directo|ry stack|
|00001af0| 20 69 73 2e 0a 4d 2d 78 | 20 64 69 72 74 72 61 63 | is..M-x| dirtrac|
|00001b00| 6b 2d 74 6f 67 67 6c 65 | 20 74 75 72 6e 73 20 64 |k-toggle| turns d|
|00001b10| 69 72 65 63 74 6f 72 79 | 20 74 72 61 63 6b 69 6e |irectory| trackin|
|00001b20| 67 20 6f 6e 20 61 6e 64 | 20 6f 66 66 2e 0a 0a 5c |g on and| off...\|
|00001b30| 5c 7b 73 68 65 6c 6c 2d | 6d 6f 64 65 2d 6d 61 70 |\{shell-|mode-map|
|00001b40| 7d 0a 43 75 73 74 6f 6d | 69 7a 61 74 69 6f 6e 3a |}.Custom|ization:|
|00001b50| 20 45 6e 74 72 79 20 74 | 6f 20 74 68 69 73 20 6d | Entry t|o this m|
|00001b60| 6f 64 65 20 72 75 6e 73 | 20 74 68 65 20 68 6f 6f |ode runs| the hoo|
|00001b70| 6b 73 20 6f 6e 20 60 63 | 6f 6d 69 6e 74 2d 6d 6f |ks on `c|omint-mo|
|00001b80| 64 65 2d 68 6f 6f 6b 27 | 20 61 6e 64 0a 60 73 68 |de-hook'| and.`sh|
|00001b90| 65 6c 6c 2d 6d 6f 64 65 | 2d 68 6f 6f 6b 27 20 28 |ell-mode|-hook' (|
|00001ba0| 69 6e 20 74 68 61 74 20 | 6f 72 64 65 72 29 2e 20 |in that |order). |
|00001bb0| 20 42 65 66 6f 72 65 20 | 65 61 63 68 20 69 6e 70 | Before |each inp|
|00001bc0| 75 74 2c 20 74 68 65 20 | 68 6f 6f 6b 73 20 6f 6e |ut, the |hooks on|
|00001bd0| 0a 60 63 6f 6d 69 6e 74 | 2d 69 6e 70 75 74 2d 66 |.`comint|-input-f|
|00001be0| 69 6c 74 65 72 2d 66 75 | 6e 63 74 69 6f 6e 73 27 |ilter-fu|nctions'|
|00001bf0| 20 61 72 65 20 72 75 6e | 2e 20 20 41 66 74 65 72 | are run|. After|
|00001c00| 20 65 61 63 68 20 73 68 | 65 6c 6c 20 6f 75 74 70 | each sh|ell outp|
|00001c10| 75 74 2c 20 74 68 65 20 | 68 6f 6f 6b 73 0a 6f 6e |ut, the |hooks.on|
|00001c20| 20 60 63 6f 6d 69 6e 74 | 2d 6f 75 74 70 75 74 2d | `comint|-output-|
|00001c30| 66 69 6c 74 65 72 2d 66 | 75 6e 63 74 69 6f 6e 73 |filter-f|unctions|
|00001c40| 27 20 61 72 65 20 72 75 | 6e 2e 0a 0a 56 61 72 69 |' are ru|n...Vari|
|00001c50| 61 62 6c 65 73 20 60 73 | 68 65 6c 6c 2d 63 64 2d |ables `s|hell-cd-|
|00001c60| 72 65 67 65 78 70 27 2c | 20 60 73 68 65 6c 6c 2d |regexp',| `shell-|
|00001c70| 70 75 73 68 64 2d 72 65 | 67 65 78 70 27 20 61 6e |pushd-re|gexp' an|
|00001c80| 64 20 60 73 68 65 6c 6c | 2d 70 6f 70 64 2d 72 65 |d `shell|-popd-re|
|00001c90| 67 65 78 70 27 0a 61 72 | 65 20 75 73 65 64 20 74 |gexp'.ar|e used t|
|00001ca0| 6f 20 6d 61 74 63 68 20 | 74 68 65 69 72 20 72 65 |o match |their re|
|00001cb0| 73 70 65 63 74 69 76 65 | 20 63 6f 6d 6d 61 6e 64 |spective| command|
|00001cc0| 73 2c 20 77 68 69 6c 65 | 20 60 73 68 65 6c 6c 2d |s, while| `shell-|
|00001cd0| 70 75 73 68 64 2d 74 6f | 68 6f 6d 65 27 2c 0a 60 |pushd-to|home',.`|
|00001ce0| 73 68 65 6c 6c 2d 70 75 | 73 68 64 2d 64 65 78 74 |shell-pu|shd-dext|
|00001cf0| 72 61 63 74 27 20 61 6e | 64 20 60 73 68 65 6c 6c |ract' an|d `shell|
|00001d00| 2d 70 75 73 68 64 2d 64 | 75 6e 69 71 75 65 27 20 |-pushd-d|unique' |
|00001d10| 63 6f 6e 74 72 6f 6c 20 | 74 68 65 20 62 65 68 61 |control |the beha|
|00001d20| 76 69 6f 72 20 6f 66 20 | 74 68 65 0a 72 65 6c 65 |vior of |the.rele|
|00001d30| 76 61 6e 74 20 63 6f 6d | 6d 61 6e 64 2e 0a 0a 56 |vant com|mand...V|
|00001d40| 61 72 69 61 62 6c 65 73 | 20 60 63 6f 6d 69 6e 74 |ariables| `comint|
|00001d50| 2d 63 6f 6d 70 6c 65 74 | 69 6f 6e 2d 61 75 74 6f |-complet|ion-auto|
|00001d60| 6c 69 73 74 27 2c 20 60 | 63 6f 6d 69 6e 74 2d 63 |list', `|comint-c|
|00001d70| 6f 6d 70 6c 65 74 69 6f | 6e 2d 61 64 64 73 75 66 |ompletio|n-addsuf|
|00001d80| 66 69 78 27 2c 0a 60 63 | 6f 6d 69 6e 74 2d 63 6f |fix',.`c|omint-co|
|00001d90| 6d 70 6c 65 74 69 6f 6e | 2d 72 65 63 65 78 61 63 |mpletion|-recexac|
|00001da0| 74 27 20 61 6e 64 20 60 | 63 6f 6d 69 6e 74 2d 63 |t' and `|comint-c|
|00001db0| 6f 6d 70 6c 65 74 69 6f | 6e 2d 66 69 67 6e 6f 72 |ompletio|n-fignor|
|00001dc0| 65 27 20 63 6f 6e 74 72 | 6f 6c 20 74 68 65 0a 62 |e' contr|ol the.b|
|00001dd0| 65 68 61 76 69 6f 72 20 | 6f 66 20 66 69 6c 65 20 |ehavior |of file |
|00001de0| 6e 61 6d 65 2c 20 63 6f | 6d 6d 61 6e 64 20 6e 61 |name, co|mmand na|
|00001df0| 6d 65 20 61 6e 64 20 76 | 61 72 69 61 62 6c 65 20 |me and v|ariable |
|00001e00| 6e 61 6d 65 20 63 6f 6d | 70 6c 65 74 69 6f 6e 2e |name com|pletion.|
|00001e10| 20 20 56 61 72 69 61 62 | 6c 65 0a 60 73 68 65 6c | Variab|le.`shel|
|00001e20| 6c 2d 63 6f 6d 70 6c 65 | 74 69 6f 6e 2d 65 78 65 |l-comple|tion-exe|
|00001e30| 63 6f 6e 6c 79 27 20 63 | 6f 6e 74 72 6f 6c 73 20 |conly' c|ontrols |
|00001e40| 74 68 65 20 62 65 68 61 | 76 69 6f 72 20 6f 66 20 |the beha|vior of |
|00001e50| 63 6f 6d 6d 61 6e 64 20 | 6e 61 6d 65 20 63 6f 6d |command |name com|
|00001e60| 70 6c 65 74 69 6f 6e 2e | 0a 56 61 72 69 61 62 6c |pletion.|.Variabl|
|00001e70| 65 20 60 73 68 65 6c 6c | 2d 63 6f 6d 70 6c 65 74 |e `shell|-complet|
|00001e80| 69 6f 6e 2d 66 69 67 6e | 6f 72 65 27 20 69 73 20 |ion-fign|ore' is |
|00001e90| 75 73 65 64 20 74 6f 20 | 69 6e 69 74 69 61 6c 69 |used to |initiali|
|00001ea0| 73 65 20 74 68 65 20 76 | 61 6c 75 65 20 6f 66 0a |se the v|alue of.|
|00001eb0| 60 63 6f 6d 69 6e 74 2d | 63 6f 6d 70 6c 65 74 69 |`comint-|completi|
|00001ec0| 6f 6e 2d 66 69 67 6e 6f | 72 65 27 2e 0a 0a 56 61 |on-figno|re'...Va|
|00001ed0| 72 69 61 62 6c 65 73 20 | 60 63 6f 6d 69 6e 74 2d |riables |`comint-|
|00001ee0| 69 6e 70 75 74 2d 72 69 | 6e 67 2d 66 69 6c 65 2d |input-ri|ng-file-|
|00001ef0| 6e 61 6d 65 27 20 61 6e | 64 20 60 63 6f 6d 69 6e |name' an|d `comin|
|00001f00| 74 2d 69 6e 70 75 74 2d | 61 75 74 6f 65 78 70 61 |t-input-|autoexpa|
|00001f10| 6e 64 27 20 63 6f 6e 74 | 72 6f 6c 0a 74 68 65 20 |nd' cont|rol.the |
|00001f20| 69 6e 69 74 69 61 6c 69 | 73 61 74 69 6f 6e 20 6f |initiali|sation o|
|00001f30| 66 20 74 68 65 20 69 6e | 70 75 74 20 72 69 6e 67 |f the in|put ring|
|00001f40| 20 68 69 73 74 6f 72 79 | 2c 20 61 6e 64 20 68 69 | history|, and hi|
|00001f50| 73 74 6f 72 79 20 65 78 | 70 61 6e 73 69 6f 6e 2e |story ex|pansion.|
|00001f60| 0a 0a 56 61 72 69 61 62 | 6c 65 73 20 60 63 6f 6d |..Variab|les `com|
|00001f70| 69 6e 74 2d 6f 75 74 70 | 75 74 2d 66 69 6c 74 65 |int-outp|ut-filte|
|00001f80| 72 2d 66 75 6e 63 74 69 | 6f 6e 73 27 2c 20 61 20 |r-functi|ons', a |
|00001f90| 68 6f 6f 6b 2c 20 61 6e | 64 0a 60 63 6f 6d 69 6e |hook, an|d.`comin|
|00001fa0| 74 2d 73 63 72 6f 6c 6c | 2d 74 6f 2d 62 6f 74 74 |t-scroll|-to-bott|
|00001fb0| 6f 6d 2d 6f 6e 2d 69 6e | 70 75 74 27 20 61 6e 64 |om-on-in|put' and|
|00001fc0| 20 60 63 6f 6d 69 6e 74 | 2d 73 63 72 6f 6c 6c 2d | `comint|-scroll-|
|00001fd0| 74 6f 2d 62 6f 74 74 6f | 6d 2d 6f 6e 2d 6f 75 74 |to-botto|m-on-out|
|00001fe0| 70 75 74 27 0a 63 6f 6e | 74 72 6f 6c 20 77 68 65 |put'.con|trol whe|
|00001ff0| 74 68 65 72 20 69 6e 70 | 75 74 20 61 6e 64 20 6f |ther inp|ut and o|
|00002000| 75 74 70 75 74 20 63 61 | 75 73 65 20 74 68 65 20 |utput ca|use the |
|00002010| 77 69 6e 64 6f 77 20 74 | 6f 20 73 63 72 6f 6c 6c |window t|o scroll|
|00002020| 20 74 6f 20 74 68 65 20 | 65 6e 64 20 6f 66 20 74 | to the |end of t|
|00002030| 68 65 0a 62 75 66 66 65 | 72 2e 22 20 6e 69 6c 5d |he.buffe|r." nil]|
|00002040| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 73 68 65 |).(defal|ias 'she|
|00002050| 6c 6c 20 23 5b 6e 69 6c | 20 22 c0 c1 21 84 56 00 |ll #[nil| "..!.V.|
|00002060| 5c 6e 86 17 00 c3 c4 21 | 86 17 00 c3 c5 21 86 17 |\n.....!|.....!..|
|00002070| 00 c6 1e 07 c8 0e 07 21 | 1e 09 ca 0e 09 50 1e 0b |.......!|.....P..|
|00002080| cc cd 0e 09 ce 51 21 1e | 0f d0 d1 d2 0e 07 d3 0e |.....Q!.|........|
|00002090| 0b 21 85 3c 00 0e 0b 0e | 0f 83 4e 00 d4 0e 0f 21 |.!.<....|..N....!|
|000020a0| 83 4e 00 0e 0f 4a 82 4f | 00 d5 25 71 88 d6 20 88 |.N...J.O|..%q.. .|
|000020b0| 2c d7 c1 21 87 22 20 5b | 63 6f 6d 69 6e 74 2d 63 |,..!." [|comint-c|
|000020c0| 68 65 63 6b 2d 70 72 6f | 63 20 22 2a 73 68 65 6c |heck-pro|c "*shel|
|000020d0| 6c 2a 22 20 65 78 70 6c | 69 63 69 74 2d 73 68 65 |l*" expl|icit-she|
|000020e0| 6c 6c 2d 66 69 6c 65 2d | 6e 61 6d 65 20 67 65 74 |ll-file-|name get|
|000020f0| 65 6e 76 20 22 45 53 48 | 45 4c 4c 22 20 22 53 48 |env "ESH|ELL" "SH|
|00002100| 45 4c 4c 22 20 22 2f 62 | 69 6e 2f 73 68 22 20 70 |ELL" "/b|in/sh" p|
|00002110| 72 6f 67 20 66 69 6c 65 | 2d 6e 61 6d 65 2d 6e 6f |rog file|-name-no|
|00002120| 6e 64 69 72 65 63 74 6f | 72 79 20 6e 61 6d 65 20 |ndirecto|ry name |
|00002130| 22 7e 2f 2e 65 6d 61 63 | 73 5f 22 20 73 74 61 72 |"~/.emac|s_" star|
|00002140| 74 66 69 6c 65 20 69 6e | 74 65 72 6e 2d 73 6f 66 |tfile in|tern-sof|
|00002150| 74 20 22 65 78 70 6c 69 | 63 69 74 2d 22 20 22 2d |t "expli|cit-" "-|
|00002160| 61 72 67 73 22 20 78 61 | 72 67 73 2d 6e 61 6d 65 |args" xa|rgs-name|
|00002170| 20 61 70 70 6c 79 20 6d | 61 6b 65 2d 63 6f 6d 69 | apply m|ake-comi|
|00002180| 6e 74 20 22 73 68 65 6c | 6c 22 20 66 69 6c 65 2d |nt "shel|l" file-|
|00002190| 65 78 69 73 74 73 2d 70 | 20 62 6f 75 6e 64 70 20 |exists-p| boundp |
|000021a0| 28 22 2d 69 22 29 20 73 | 68 65 6c 6c 2d 6d 6f 64 |("-i") s|hell-mod|
|000021b0| 65 20 73 77 69 74 63 68 | 2d 74 6f 2d 62 75 66 66 |e switch|-to-buff|
|000021c0| 65 72 5d 20 37 20 22 5c | 0a 52 75 6e 20 61 6e 20 |er] 7 "\|.Run an |
|000021d0| 69 6e 66 65 72 69 6f 72 | 20 73 68 65 6c 6c 2c 20 |inferior| shell, |
|000021e0| 77 69 74 68 20 49 2f 4f | 20 74 68 72 6f 75 67 68 |with I/O| through|
|000021f0| 20 62 75 66 66 65 72 20 | 2a 73 68 65 6c 6c 2a 2e | buffer |*shell*.|
|00002200| 0a 49 66 20 62 75 66 66 | 65 72 20 65 78 69 73 74 |.If buff|er exist|
|00002210| 73 20 62 75 74 20 73 68 | 65 6c 6c 20 70 72 6f 63 |s but sh|ell proc|
|00002220| 65 73 73 20 69 73 20 6e | 6f 74 20 72 75 6e 6e 69 |ess is n|ot runni|
|00002230| 6e 67 2c 20 6d 61 6b 65 | 20 6e 65 77 20 73 68 65 |ng, make| new she|
|00002240| 6c 6c 2e 0a 49 66 20 62 | 75 66 66 65 72 20 65 78 |ll..If b|uffer ex|
|00002250| 69 73 74 73 20 61 6e 64 | 20 73 68 65 6c 6c 20 70 |ists and| shell p|
|00002260| 72 6f 63 65 73 73 20 69 | 73 20 72 75 6e 6e 69 6e |rocess i|s runnin|
|00002270| 67 2c 20 6a 75 73 74 20 | 73 77 69 74 63 68 20 74 |g, just |switch t|
|00002280| 6f 20 62 75 66 66 65 72 | 20 60 2a 73 68 65 6c 6c |o buffer| `*shell|
|00002290| 2a 27 2e 0a 50 72 6f 67 | 72 61 6d 20 75 73 65 64 |*'..Prog|ram used|
|000022a0| 20 63 6f 6d 65 73 20 66 | 72 6f 6d 20 76 61 72 69 | comes f|rom vari|
|000022b0| 61 62 6c 65 20 60 65 78 | 70 6c 69 63 69 74 2d 73 |able `ex|plicit-s|
|000022c0| 68 65 6c 6c 2d 66 69 6c | 65 2d 6e 61 6d 65 27 2c |hell-fil|e-name',|
|000022d0| 0a 20 6f 72 20 28 69 66 | 20 74 68 61 74 20 69 73 |. or (if| that is|
|000022e0| 20 6e 69 6c 29 20 66 72 | 6f 6d 20 74 68 65 20 45 | nil) fr|om the E|
|000022f0| 53 48 45 4c 4c 20 65 6e | 76 69 72 6f 6e 6d 65 6e |SHELL en|vironmen|
|00002300| 74 20 76 61 72 69 61 62 | 6c 65 2c 0a 20 6f 72 20 |t variab|le,. or |
|00002310| 65 6c 73 65 20 66 72 6f | 6d 20 53 48 45 4c 4c 20 |else fro|m SHELL |
|00002320| 69 66 20 74 68 65 72 65 | 20 69 73 20 6e 6f 20 45 |if there| is no E|
|00002330| 53 48 45 4c 4c 2e 0a 49 | 66 20 61 20 66 69 6c 65 |SHELL..I|f a file|
|00002340| 20 60 7e 2f 2e 65 6d 61 | 63 73 5f 53 48 45 4c 4c | `~/.ema|cs_SHELL|
|00002350| 4e 41 4d 45 27 20 65 78 | 69 73 74 73 2c 20 69 74 |NAME' ex|ists, it|
|00002360| 20 69 73 20 67 69 76 65 | 6e 20 61 73 20 69 6e 69 | is give|n as ini|
|00002370| 74 69 61 6c 20 69 6e 70 | 75 74 0a 20 28 4e 6f 74 |tial inp|ut. (Not|
|00002380| 65 20 74 68 61 74 20 74 | 68 69 73 20 6d 61 79 20 |e that t|his may |
|00002390| 6c 6f 73 65 20 64 75 65 | 20 74 6f 20 61 20 74 69 |lose due| to a ti|
|000023a0| 6d 69 6e 67 20 65 72 72 | 6f 72 20 69 66 20 74 68 |ming err|or if th|
|000023b0| 65 20 73 68 65 6c 6c 0a | 20 20 64 69 73 63 61 72 |e shell.| discar|
|000023c0| 64 73 20 69 6e 70 75 74 | 20 77 68 65 6e 20 69 74 |ds input| when it|
|000023d0| 20 73 74 61 72 74 73 20 | 75 70 2e 29 0a 54 68 65 | starts |up.).The|
|000023e0| 20 62 75 66 66 65 72 20 | 69 73 20 70 75 74 20 69 | buffer |is put i|
|000023f0| 6e 20 53 68 65 6c 6c 20 | 6d 6f 64 65 2c 20 67 69 |n Shell |mode, gi|
|00002400| 76 69 6e 67 20 63 6f 6d | 6d 61 6e 64 73 20 66 6f |ving com|mands fo|
|00002410| 72 20 73 65 6e 64 69 6e | 67 20 69 6e 70 75 74 0a |r sendin|g input.|
|00002420| 61 6e 64 20 63 6f 6e 74 | 72 6f 6c 6c 69 6e 67 20 |and cont|rolling |
|00002430| 74 68 65 20 73 75 62 6a | 6f 62 73 20 6f 66 20 74 |the subj|obs of t|
|00002440| 68 65 20 73 68 65 6c 6c | 2e 20 20 53 65 65 20 60 |he shell|. See `|
|00002450| 73 68 65 6c 6c 2d 6d 6f | 64 65 27 2e 0a 53 65 65 |shell-mo|de'..See|
|00002460| 20 61 6c 73 6f 20 74 68 | 65 20 76 61 72 69 61 62 | also th|e variab|
|00002470| 6c 65 20 60 73 68 65 6c | 6c 2d 70 72 6f 6d 70 74 |le `shel|l-prompt|
|00002480| 2d 70 61 74 74 65 72 6e | 27 2e 0a 0a 54 68 65 20 |-pattern|'...The |
|00002490| 73 68 65 6c 6c 20 66 69 | 6c 65 20 6e 61 6d 65 20 |shell fi|le name |
|000024a0| 28 73 61 6e 73 20 64 69 | 72 65 63 74 6f 72 69 65 |(sans di|rectorie|
|000024b0| 73 29 20 69 73 20 75 73 | 65 64 20 74 6f 20 6d 61 |s) is us|ed to ma|
|000024c0| 6b 65 20 61 20 73 79 6d | 62 6f 6c 20 6e 61 6d 65 |ke a sym|bol name|
|000024d0| 0a 73 75 63 68 20 61 73 | 20 60 65 78 70 6c 69 63 |.such as| `explic|
|000024e0| 69 74 2d 63 73 68 2d 61 | 72 67 73 27 2e 20 20 49 |it-csh-a|rgs'. I|
|000024f0| 66 20 74 68 61 74 20 73 | 79 6d 62 6f 6c 20 69 73 |f that s|ymbol is|
|00002500| 20 61 20 76 61 72 69 61 | 62 6c 65 2c 0a 69 74 73 | a varia|ble,.its|
|00002510| 20 76 61 6c 75 65 20 69 | 73 20 75 73 65 64 20 61 | value i|s used a|
|00002520| 73 20 61 20 6c 69 73 74 | 20 6f 66 20 61 72 67 75 |s a list| of argu|
|00002530| 6d 65 6e 74 73 20 77 68 | 65 6e 20 69 6e 76 6f 6b |ments wh|en invok|
|00002540| 69 6e 67 20 74 68 65 20 | 73 68 65 6c 6c 2e 0a 4f |ing the |shell..O|
|00002550| 74 68 65 72 77 69 73 65 | 2c 20 6f 6e 65 20 61 72 |therwise|, one ar|
|00002560| 67 75 6d 65 6e 74 20 60 | 2d 69 27 20 69 73 20 70 |gument `|-i' is p|
|00002570| 61 73 73 65 64 20 74 6f | 20 74 68 65 20 73 68 65 |assed to| the she|
|00002580| 6c 6c 2e 0a 0a 28 54 79 | 70 65 20 5c 5c 5b 64 65 |ll...(Ty|pe \\[de|
|00002590| 73 63 72 69 62 65 2d 6d | 6f 64 65 5d 20 69 6e 20 |scribe-m|ode] in |
|000025a0| 74 68 65 20 73 68 65 6c | 6c 20 62 75 66 66 65 72 |the shel|l buffer|
|000025b0| 20 66 6f 72 20 61 20 6c | 69 73 74 20 6f 66 20 63 | for a l|ist of c|
|000025c0| 6f 6d 6d 61 6e 64 73 2e | 29 22 20 6e 69 6c 5d 29 |ommands.|)" nil])|
|000025d0| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 73 68 65 6c |.(defali|as 'shel|
|000025e0| 6c 2d 64 69 72 65 63 74 | 6f 72 79 2d 74 72 61 63 |l-direct|ory-trac|
|000025f0| 6b 65 72 20 23 5b 28 73 | 74 72 29 20 22 08 85 08 |ker #[(s|tr) "...|
|00002600| 00 c1 c2 c3 8f 87 22 20 | 5b 73 68 65 6c 6c 2d 64 |......" |[shell-d|
|00002610| 69 72 74 72 61 63 6b 70 | 20 63 68 64 69 72 2d 66 |irtrackp| chdir-f|
|00002620| 61 69 6c 75 72 65 20 28 | 62 79 74 65 2d 63 6f 64 |ailure (|byte-cod|
|00002630| 65 20 22 c0 c1 5c 6e 5c | 22 88 c3 95 c4 89 89 1d |e "..\n\|".......|
|00002640| 1e 06 1e 07 1e 08 c0 0e | 09 5c 6e 0e 08 23 85 7d |........|.\n..#.}|
|00002650| 00 c3 95 16 07 ca 5c 6e | 0e 08 0e 07 4f c3 89 23 |......\n|....O..#|
|00002660| 16 06 ca 5c 6e 0e 08 0e | 07 4f cb 89 23 15 c0 0e |...\n...|.O..#...|
|00002670| 5c 66 0e 06 5c 22 c3 3d | 83 4a 00 cd ce 0d 21 21 |\f..\".=|.J....!!|
|00002680| 88 82 6f 00 c0 0e 0f 0e | 06 5c 22 c3 3d 83 5e 00 |..o.....|.\".=.^.|
|00002690| d0 ce 0d 21 21 88 82 6f | 00 c0 0e 11 0e 06 5c 22 |...!!..o|......\"|
|000026a0| c3 3d 83 6f 00 d2 ce 0d | 21 21 88 c0 d3 5c 6e 0e |.=.o....|!!...\n.|
|000026b0| 07 23 88 c3 95 16 08 82 | 11 00 2c 87 22 20 5b 73 |.#......|..,." [s|
|000026c0| 74 72 69 6e 67 2d 6d 61 | 74 63 68 20 22 5e 5b 3b |tring-ma|tch "^[;|
|000026d0| 5c 5c 73 20 5d 2a 22 20 | 73 74 72 20 30 20 6e 69 |\\s ]*" |str 0 ni|
|000026e0| 6c 20 61 72 67 31 20 63 | 6d 64 20 65 6e 64 20 73 |l arg1 c|md end s|
|000026f0| 74 61 72 74 20 73 68 65 | 6c 6c 2d 63 6f 6d 6d 61 |tart she|ll-comma|
|00002700| 6e 64 2d 72 65 67 65 78 | 70 20 63 6f 6d 69 6e 74 |nd-regex|p comint|
|00002710| 2d 61 72 67 75 6d 65 6e | 74 73 20 31 20 73 68 65 |-argumen|ts 1 she|
|00002720| 6c 6c 2d 70 6f 70 64 2d | 72 65 67 65 78 70 20 73 |ll-popd-|regexp s|
|00002730| 68 65 6c 6c 2d 70 72 6f | 63 65 73 73 2d 70 6f 70 |hell-pro|cess-pop|
|00002740| 64 20 73 75 62 73 74 69 | 74 75 74 65 2d 69 6e 2d |d substi|tute-in-|
|00002750| 66 69 6c 65 2d 6e 61 6d | 65 20 73 68 65 6c 6c 2d |file-nam|e shell-|
|00002760| 70 75 73 68 64 2d 72 65 | 67 65 78 70 20 73 68 65 |pushd-re|gexp she|
|00002770| 6c 6c 2d 70 72 6f 63 65 | 73 73 2d 70 75 73 68 64 |ll-proce|ss-pushd|
|00002780| 20 73 68 65 6c 6c 2d 63 | 64 2d 72 65 67 65 78 70 | shell-c|d-regexp|
|00002790| 20 73 68 65 6c 6c 2d 70 | 72 6f 63 65 73 73 2d 63 | shell-p|rocess-c|
|000027a0| 64 20 22 5b 3b 5c 5c 73 | 20 5d 2a 22 5d 20 34 29 |d "[;\\s| ]*"] 4)|
|000027b0| 20 28 28 65 72 72 6f 72 | 20 22 43 6f 75 6c 64 6e | ((error| "Couldn|
|000027c0| 27 74 20 63 64 22 29 29 | 5d 20 33 20 22 5c 0a 54 |'t cd"))|] 3 "\.T|
|000027d0| 72 61 63 6b 73 20 63 64 | 2c 20 70 75 73 68 64 20 |racks cd|, pushd |
|000027e0| 61 6e 64 20 70 6f 70 64 | 20 63 6f 6d 6d 61 6e 64 |and popd| command|
|000027f0| 73 20 69 73 73 75 65 64 | 20 74 6f 20 74 68 65 20 |s issued| to the |
|00002800| 73 68 65 6c 6c 2e 0a 54 | 68 69 73 20 66 75 6e 63 |shell..T|his func|
|00002810| 74 69 6f 6e 20 69 73 20 | 63 61 6c 6c 65 64 20 6f |tion is |called o|
|00002820| 6e 20 65 61 63 68 20 69 | 6e 70 75 74 20 70 61 73 |n each i|nput pas|
|00002830| 73 65 64 20 74 6f 20 74 | 68 65 20 73 68 65 6c 6c |sed to t|he shell|
|00002840| 2e 0a 49 74 20 77 61 74 | 63 68 65 73 20 66 6f 72 |..It wat|ches for|
|00002850| 20 63 64 2c 20 70 75 73 | 68 64 20 61 6e 64 20 70 | cd, pus|hd and p|
|00002860| 6f 70 64 20 63 6f 6d 6d | 61 6e 64 73 20 61 6e 64 |opd comm|ands and|
|00002870| 20 73 65 74 73 20 74 68 | 65 20 62 75 66 66 65 72 | sets th|e buffer|
|00002880| 27 73 0a 64 65 66 61 75 | 6c 74 20 64 69 72 65 63 |'s.defau|lt direc|
|00002890| 74 6f 72 79 20 74 6f 20 | 74 72 61 63 6b 20 74 68 |tory to |track th|
|000028a0| 65 73 65 20 63 6f 6d 6d | 61 6e 64 73 2e 0a 0a 59 |ese comm|ands...Y|
|000028b0| 6f 75 20 6d 61 79 20 74 | 6f 67 67 6c 65 20 74 68 |ou may t|oggle th|
|000028c0| 69 73 20 74 72 61 63 6b | 69 6e 67 20 6f 6e 20 61 |is track|ing on a|
|000028d0| 6e 64 20 6f 66 66 20 77 | 69 74 68 20 4d 2d 78 20 |nd off w|ith M-x |
|000028e0| 64 69 72 74 72 61 63 6b | 2d 74 6f 67 67 6c 65 2e |dirtrack|-toggle.|
|000028f0| 0a 49 66 20 65 6d 61 63 | 73 20 67 65 74 73 20 63 |.If emac|s gets c|
|00002900| 6f 6e 66 75 73 65 64 2c | 20 79 6f 75 20 63 61 6e |onfused,| you can|
|00002910| 20 72 65 73 79 6e 63 20 | 77 69 74 68 20 74 68 65 | resync |with the|
|00002920| 20 73 68 65 6c 6c 20 77 | 69 74 68 20 4d 2d 78 20 | shell w|ith M-x |
|00002930| 64 69 72 73 2e 0a 0a 53 | 65 65 20 76 61 72 69 61 |dirs...S|ee varia|
|00002940| 62 6c 65 73 20 60 73 68 | 65 6c 6c 2d 63 64 2d 72 |bles `sh|ell-cd-r|
|00002950| 65 67 65 78 70 27 2c 20 | 60 73 68 65 6c 6c 2d 70 |egexp', |`shell-p|
|00002960| 75 73 68 64 2d 72 65 67 | 65 78 70 27 2c 20 61 6e |ushd-reg|exp', an|
|00002970| 64 20 60 73 68 65 6c 6c | 2d 70 6f 70 64 2d 72 65 |d `shell|-popd-re|
|00002980| 67 65 78 70 27 2c 0a 77 | 68 69 6c 65 20 60 73 68 |gexp',.w|hile `sh|
|00002990| 65 6c 6c 2d 70 75 73 68 | 64 2d 74 6f 68 6f 6d 65 |ell-push|d-tohome|
|000029a0| 27 2c 20 60 73 68 65 6c | 6c 2d 70 75 73 68 64 2d |', `shel|l-pushd-|
|000029b0| 64 65 78 74 72 61 63 74 | 27 20 61 6e 64 20 60 73 |dextract|' and `s|
|000029c0| 68 65 6c 6c 2d 70 75 73 | 68 64 2d 64 75 6e 69 71 |hell-pus|hd-duniq|
|000029d0| 75 65 27 0a 63 6f 6e 74 | 72 6f 6c 20 74 68 65 20 |ue'.cont|rol the |
|000029e0| 62 65 68 61 76 69 6f 72 | 20 6f 66 20 74 68 65 20 |behavior| of the |
|000029f0| 72 65 6c 65 76 61 6e 74 | 20 63 6f 6d 6d 61 6e 64 |relevant| command|
|00002a00| 2e 0a 0a 45 6e 76 69 72 | 6f 6e 6d 65 6e 74 20 76 |...Envir|onment v|
|00002a10| 61 72 69 61 62 6c 65 73 | 20 61 72 65 20 65 78 70 |ariables| are exp|
|00002a20| 61 6e 64 65 64 2c 20 73 | 65 65 20 66 75 6e 63 74 |anded, s|ee funct|
|00002a30| 69 6f 6e 20 60 73 75 62 | 73 74 69 74 75 74 65 2d |ion `sub|stitute-|
|00002a40| 69 6e 2d 66 69 6c 65 2d | 6e 61 6d 65 27 2e 22 5d |in-file-|name'."]|
|00002a50| 29 0a 28 62 79 74 65 2d | 63 6f 64 65 20 22 c0 c1 |).(byte-|code "..|
|00002a60| c2 5c 22 88 c0 c3 c4 5c | 22 88 c5 c3 c6 c7 23 88 |.\"....\|".....#.|
|00002a70| c0 c8 c9 5c 22 88 c0 ca | cb 5c 22 88 c0 cc cd 5c |...\"...|.\"....\|
|00002a80| 22 87 22 20 5b 64 65 66 | 61 6c 69 61 73 20 73 68 |"." [def|alias sh|
|00002a90| 65 6c 6c 2d 70 72 6f 63 | 65 73 73 2d 70 6f 70 64 |ell-proc|ess-popd|
|00002aa0| 20 23 5b 28 61 72 67 29 | 20 22 c0 09 21 86 07 00 | #[(arg)| "..!...|
|00002ab0| c2 89 1b 83 23 00 0b c2 | 55 83 23 00 5c 66 83 23 |....#...|U.#.\f.#|
|00002ac0| 00 c5 5c 66 40 21 88 5c | 66 41 14 c6 20 82 53 00 |..\f@!.\|fA.. .S.|
|00002ad0| 0b 83 50 00 0b c2 56 83 | 50 00 0b 5c 66 47 58 83 |..P...V.|P..\fGX.|
|00002ae0| 50 00 c7 5c 66 42 1e 08 | 0b 53 0e 08 9b 89 1e 09 |P..\fB..|.S......|
|00002af0| 89 41 41 a1 88 0e 08 41 | 14 c6 20 2a 82 53 00 ca |.AA....A|.. *.S..|
|00002b00| cb 21 29 87 22 20 5b 73 | 68 65 6c 6c 2d 65 78 74 |.!)." [s|hell-ext|
|00002b10| 72 61 63 74 2d 6e 75 6d | 20 61 72 67 20 30 20 6e |ract-num| arg 0 n|
|00002b20| 75 6d 20 73 68 65 6c 6c | 2d 64 69 72 73 74 61 63 |um shell|-dirstac|
|00002b30| 6b 20 63 64 20 73 68 65 | 6c 6c 2d 64 69 72 73 74 |k cd she|ll-dirst|
|00002b40| 61 63 6b 2d 6d 65 73 73 | 61 67 65 20 6e 69 6c 20 |ack-mess|age nil |
|00002b50| 64 73 20 63 65 6c 6c 20 | 65 72 72 6f 72 20 22 43 |ds cell |error "C|
|00002b60| 6f 75 6c 64 6e 27 74 20 | 70 6f 70 64 22 5d 20 33 |ouldn't |popd"] 3|
|00002b70| 5d 20 73 68 65 6c 6c 2d | 70 72 65 66 69 78 65 64 |] shell-|prefixed|
|00002b80| 2d 64 69 72 65 63 74 6f | 72 79 2d 6e 61 6d 65 20 |-directo|ry-name |
|00002b90| 23 5b 28 64 69 72 29 20 | 22 c0 09 21 83 5c 6e 00 |#[(dir) |"..!.\n.|
|00002ba0| 5c 6e 09 50 87 c3 09 21 | 87 22 20 5b 66 69 6c 65 |\n.P...!|." [file|
|00002bb0| 2d 6e 61 6d 65 2d 61 62 | 73 6f 6c 75 74 65 2d 70 |-name-ab|solute-p|
|00002bc0| 20 64 69 72 20 63 6f 6d | 69 6e 74 2d 66 69 6c 65 | dir com|int-file|
|00002bd0| 2d 6e 61 6d 65 2d 70 72 | 65 66 69 78 20 65 78 70 |-name-pr|efix exp|
|00002be0| 61 6e 64 2d 66 69 6c 65 | 2d 6e 61 6d 65 5d 20 32 |and-file|-name] 2|
|00002bf0| 5d 20 70 75 74 20 62 79 | 74 65 2d 6f 70 74 69 6d |] put by|te-optim|
|00002c00| 69 7a 65 72 20 62 79 74 | 65 2d 63 6f 6d 70 69 6c |izer byt|e-compil|
|00002c10| 65 2d 69 6e 6c 69 6e 65 | 2d 65 78 70 61 6e 64 20 |e-inline|-expand |
|00002c20| 73 68 65 6c 6c 2d 70 72 | 6f 63 65 73 73 2d 63 64 |shell-pr|ocess-cd|
|00002c30| 20 23 5b 28 61 72 67 29 | 20 22 08 47 c1 55 83 0d | #[(arg)| ".G.U..|
|00002c40| 00 5c 6e c3 50 82 2d 00 | 08 c4 98 83 17 00 0d 82 |.\n.P.-.|........|
|00002c50| 2d 00 08 1e 06 c7 0e 06 | 21 83 28 00 5c 6e 0e 06 |-.......|!.(.\n..|
|00002c60| 50 82 2c 00 c8 0e 06 21 | 29 1e 09 0e 5c 6e 15 cb |P.,....!|)...\n..|
|00002c70| 0e 09 21 88 cc 20 29 87 | 22 20 5b 61 72 67 20 30 |..!.. ).|" [arg 0|
|00002c80| 20 63 6f 6d 69 6e 74 2d | 66 69 6c 65 2d 6e 61 6d | comint-|file-nam|
|00002c90| 65 2d 70 72 65 66 69 78 | 20 22 7e 22 20 22 2d 22 |e-prefix| "~" "-"|
|00002ca0| 20 73 68 65 6c 6c 2d 6c | 61 73 74 2d 64 69 72 20 | shell-l|ast-dir |
|00002cb0| 64 69 72 20 66 69 6c 65 | 2d 6e 61 6d 65 2d 61 62 |dir file|-name-ab|
|00002cc0| 73 6f 6c 75 74 65 2d 70 | 20 65 78 70 61 6e 64 2d |solute-p| expand-|
|00002cd0| 66 69 6c 65 2d 6e 61 6d | 65 20 6e 65 77 2d 64 69 |file-nam|e new-di|
|00002ce0| 72 20 64 65 66 61 75 6c | 74 2d 64 69 72 65 63 74 |r defaul|t-direct|
|00002cf0| 6f 72 79 20 63 64 20 73 | 68 65 6c 6c 2d 64 69 72 |ory cd s|hell-dir|
|00002d00| 73 74 61 63 6b 2d 6d 65 | 73 73 61 67 65 5d 20 32 |stack-me|ssage] 2|
|00002d10| 5d 20 73 68 65 6c 6c 2d | 70 72 6f 63 65 73 73 2d |] shell-|process-|
|00002d20| 70 75 73 68 64 20 23 5b | 28 61 72 67 29 20 22 c0 |pushd #[|(arg) ".|
|00002d30| 09 21 1a 09 47 c3 55 83 | 3b 00 5c 66 83 18 00 c5 |.!..G.U.|;.\f....|
|00002d40| 0e 06 c7 50 21 82 e8 00 | 0e 08 83 35 00 0e 09 1e |...P!...|...5....|
|00002d50| 5c 6e cb 0e 08 40 21 88 | 0e 5c 6e 0e 08 41 42 16 |\n...@!.|.\n..AB.|
|00002d60| 08 cc 20 29 82 e8 00 cd | ce 21 82 e8 00 5c 6e a7 |.. )....|.!...\n.|
|00002d70| 83 b3 00 5c 6e 0e 08 47 | 56 83 4e 00 cd cf 21 82 |...\n..G|V.N...!.|
|00002d80| e8 00 5c 6e c3 55 83 5c | 5c 00 d0 cd d1 21 21 82 |..\n.U.\|\....!!.|
|00002d90| e8 00 0e 12 83 7c 00 5c | 6e 53 0e 08 38 1e 13 d4 |.....|.\|nS..8...|
|00002da0| 09 21 88 c5 0e 09 21 88 | cb 0e 13 21 88 cc 20 29 |.!....!.|...!.. )|
|00002db0| 82 e8 00 0e 09 0e 08 42 | 89 1e 15 47 1e 16 5c 6e |.......B|...G..\n|
|00002dc0| 0e 15 9b 1e 17 d8 0e 16 | 5c 6e 5a d8 0e 15 21 9b |........|\nZ...!.|
|00002dd0| 21 1e 19 da 0e 17 0e 19 | 5c 22 1e 1b cb 0e 1b 40 |!.......|\".....@|
|00002de0| 21 88 0e 1b 41 16 08 cc | 20 2d 82 e8 00 0e 09 1e |!...A...| -......|
|00002df0| 1c cb 09 1e 13 dd 0e 13 | 21 83 ca 00 0e 06 0e 13 |........|!.......|
|00002e00| 50 82 ce 00 de 0e 13 21 | 29 21 88 0e 1f 83 de 00 |P......!|)!......|
|00002e10| 0e 1c 0e 08 9d 84 e5 00 | 0e 1c 0e 08 42 16 08 cc |........|....B...|
|00002e20| 20 29 29 87 22 20 5b 73 | 68 65 6c 6c 2d 65 78 74 | ))." [s|hell-ext|
|00002e30| 72 61 63 74 2d 6e 75 6d | 20 61 72 67 20 6e 75 6d |ract-num| arg num|
|00002e40| 20 30 20 73 68 65 6c 6c | 2d 70 75 73 68 64 2d 74 | 0 shell|-pushd-t|
|00002e50| 6f 68 6f 6d 65 20 73 68 | 65 6c 6c 2d 70 72 6f 63 |ohome sh|ell-proc|
|00002e60| 65 73 73 2d 70 75 73 68 | 64 20 63 6f 6d 69 6e 74 |ess-push|d comint|
|00002e70| 2d 66 69 6c 65 2d 6e 61 | 6d 65 2d 70 72 65 66 69 |-file-na|me-prefi|
|00002e80| 78 20 22 7e 22 20 73 68 | 65 6c 6c 2d 64 69 72 73 |x "~" sh|ell-dirs|
|00002e90| 74 61 63 6b 20 64 65 66 | 61 75 6c 74 2d 64 69 72 |tack def|ault-dir|
|00002ea0| 65 63 74 6f 72 79 20 6f | 6c 64 20 63 64 20 73 68 |ectory o|ld cd sh|
|00002eb0| 65 6c 6c 2d 64 69 72 73 | 74 61 63 6b 2d 6d 65 73 |ell-dirs|tack-mes|
|00002ec0| 73 61 67 65 20 6d 65 73 | 73 61 67 65 20 22 44 69 |sage mes|sage "Di|
|00002ed0| 72 65 63 74 6f 72 79 20 | 73 74 61 63 6b 20 65 6d |rectory |stack em|
|00002ee0| 70 74 79 2e 22 20 22 44 | 69 72 65 63 74 6f 72 79 |pty." "D|irectory|
|00002ef0| 20 73 74 61 63 6b 20 6e | 6f 74 20 74 68 61 74 20 | stack n|ot that |
|00002f00| 64 65 65 70 2e 22 20 65 | 72 72 6f 72 20 22 43 6f |deep." e|rror "Co|
|00002f10| 75 6c 64 6e 27 74 20 63 | 64 2e 22 20 73 68 65 6c |uldn't c|d." shel|
|00002f20| 6c 2d 70 75 73 68 64 2d | 64 65 78 74 72 61 63 74 |l-pushd-|dextract|
|00002f30| 20 64 69 72 20 73 68 65 | 6c 6c 2d 70 72 6f 63 65 | dir she|ll-proce|
|00002f40| 73 73 2d 70 6f 70 64 20 | 64 73 20 64 73 6c 65 6e |ss-popd |ds dslen|
|00002f50| 20 66 72 6f 6e 74 20 72 | 65 76 65 72 73 65 20 62 | front r|everse b|
|00002f60| 61 63 6b 20 61 70 70 65 | 6e 64 20 6e 65 77 2d 64 |ack appe|nd new-d|
|00002f70| 73 20 6f 6c 64 2d 77 64 | 20 66 69 6c 65 2d 6e 61 |s old-wd| file-na|
|00002f80| 6d 65 2d 61 62 73 6f 6c | 75 74 65 2d 70 20 65 78 |me-absol|ute-p ex|
|00002f90| 70 61 6e 64 2d 66 69 6c | 65 2d 6e 61 6d 65 20 73 |pand-fil|e-name s|
|00002fa0| 68 65 6c 6c 2d 70 75 73 | 68 64 2d 64 75 6e 69 71 |hell-pus|hd-duniq|
|00002fb0| 75 65 5d 20 35 5d 20 73 | 68 65 6c 6c 2d 65 78 74 |ue] 5] s|hell-ext|
|00002fc0| 72 61 63 74 2d 6e 75 6d | 20 23 5b 28 73 74 72 29 |ract-num| #[(str)|
|00002fd0| 20 22 c0 c1 5c 6e 5c 22 | 85 5c 6e 00 c3 5c 6e 21 | "..\n\"|.\n..\n!|
|00002fe0| 87 22 20 5b 73 74 72 69 | 6e 67 2d 6d 61 74 63 68 |." [stri|ng-match|
|00002ff0| 20 22 5e 5c 5c 2b 5b 31 | 2d 39 5d 5b 30 2d 39 5d | "^\\+[1|-9][0-9]|
|00003000| 2a 24 22 20 73 74 72 20 | 73 74 72 69 6e 67 2d 74 |*$" str |string-t|
|00003010| 6f 2d 69 6e 74 5d 20 33 | 5d 5d 20 34 29 0a 28 64 |o-int] 3|]] 4).(d|
|00003020| 65 66 61 6c 69 61 73 20 | 27 73 68 65 6c 6c 2d 64 |efalias |'shell-d|
|00003030| 69 72 74 72 61 63 6b 2d | 74 6f 67 67 6c 65 20 23 |irtrack-|toggle #|
|00003040| 5b 6e 69 6c 20 22 08 3f | 10 c1 c2 08 83 0d 00 c3 |[nil ".?|........|
|00003050| 82 0e 00 c4 5c 22 87 22 | 20 5b 73 68 65 6c 6c 2d |....\"."| [shell-|
|00003060| 64 69 72 74 72 61 63 6b | 70 20 6d 65 73 73 61 67 |dirtrack|p messag|
|00003070| 65 20 22 44 69 72 65 63 | 74 6f 72 79 20 74 72 61 |e "Direc|tory tra|
|00003080| 63 6b 69 6e 67 20 25 73 | 22 20 22 4f 4e 22 20 22 |cking %s|" "ON" "|
|00003090| 4f 46 46 22 5d 20 33 20 | 22 5c 0a 54 75 72 6e 20 |OFF"] 3 |"\.Turn |
|000030a0| 64 69 72 65 63 74 6f 72 | 79 20 74 72 61 63 6b 69 |director|y tracki|
|000030b0| 6e 67 20 6f 6e 20 61 6e | 64 20 6f 66 66 20 69 6e |ng on an|d off in|
|000030c0| 20 61 20 73 68 65 6c 6c | 20 62 75 66 66 65 72 2e | a shell| buffer.|
|000030d0| 22 20 6e 69 6c 5d 29 0a | 28 64 65 66 61 6c 69 61 |" nil]).|(defalia|
|000030e0| 73 20 28 71 75 6f 74 65 | 20 64 69 72 74 72 61 63 |s (quote| dirtrac|
|000030f0| 6b 2d 74 6f 67 67 6c 65 | 29 20 28 71 75 6f 74 65 |k-toggle|) (quote|
|00003100| 20 73 68 65 6c 6c 2d 64 | 69 72 74 72 61 63 6b 2d | shell-d|irtrack-|
|00003110| 74 6f 67 67 6c 65 29 29 | 0a 28 64 65 66 61 6c 69 |toggle))|.(defali|
|00003120| 61 73 20 27 73 68 65 6c | 6c 2d 72 65 73 79 6e 63 |as 'shel|l-resync|
|00003130| 2d 64 69 72 73 20 23 5b | 6e 69 6c 20 22 c0 70 21 |-dirs #[|nil ".p!|
|00003140| 19 c2 09 21 89 1b 62 88 | 5c 66 63 88 c5 63 88 c6 |...!..b.|\fc..c..|
|00003150| c7 21 88 c8 09 5c 66 5c | 22 88 c8 09 c5 5c 22 88 |.!...\f\|"....\".|
|00003160| 0b 60 c9 93 88 60 1e 5c | 6e c5 63 88 cb cc 21 88 |.`...`.\|n.c...!.|
|00003170| cd ce 21 84 3f 00 cf 09 | 21 88 0e 5c 6e 62 88 82 |..!.?...|!..\nb..|
|00003180| 2e 00 29 0b 62 88 d0 cc | 21 88 c7 94 c7 95 53 7b |..).b...|!.....S{|
|00003190| 89 1e 11 47 1e 12 c9 1e | 13 c7 1e 14 c7 0e 12 57 |...G....|.......W|
|000031a0| 83 7f 00 d5 d6 0e 11 0e | 14 23 88 0e 17 0e 11 cc |........|.#......|
|000031b0| 94 cc 95 4f 50 0e 13 42 | 16 13 c7 95 89 16 14 82 |...OP..B|........|
|000031c0| 5a 00 0e 13 9f 1e 13 c9 | d8 d9 8f 2e 07 87 22 20 |Z.......|......" |
|000031d0| 5b 67 65 74 2d 62 75 66 | 66 65 72 2d 70 72 6f 63 |[get-buf|fer-proc|
|000031e0| 65 73 73 20 70 72 6f 63 | 20 70 72 6f 63 65 73 73 |ess proc| process|
|000031f0| 2d 6d 61 72 6b 20 70 6d | 61 72 6b 20 73 68 65 6c |-mark pm|ark shel|
|00003200| 6c 2d 64 69 72 73 74 61 | 63 6b 2d 71 75 65 72 79 |l-dirsta|ck-query|
|00003210| 20 22 5c 6e 22 20 73 69 | 74 2d 66 6f 72 20 30 20 | "\n" si|t-for 0 |
|00003220| 63 6f 6d 69 6e 74 2d 73 | 65 6e 64 2d 73 74 72 69 |comint-s|end-stri|
|00003230| 6e 67 20 6e 69 6c 20 70 | 74 20 62 61 63 6b 77 61 |ng nil p|t backwa|
|00003240| 72 64 2d 63 68 61 72 20 | 31 20 6c 6f 6f 6b 69 6e |rd-char |1 lookin|
|00003250| 67 2d 61 74 20 22 2e 2b | 5c 6e 22 20 61 63 63 65 |g-at ".+|\n" acce|
|00003260| 70 74 2d 70 72 6f 63 65 | 73 73 2d 6f 75 74 70 75 |pt-proce|ss-outpu|
|00003270| 74 20 64 65 6c 65 74 65 | 2d 63 68 61 72 20 64 6c |t delete|-char dl|
|00003280| 20 64 6c 2d 6c 65 6e 20 | 64 73 20 69 20 73 74 72 | dl-len |ds i str|
|00003290| 69 6e 67 2d 6d 61 74 63 | 68 20 22 5c 5c 73 20 2a |ing-matc|h "\\s *|
|000032a0| 5c 5c 28 5c 5c 53 20 2b | 5c 5c 29 5c 5c 73 20 2a |\\(\\S +|\\)\\s *|
|000032b0| 22 20 63 6f 6d 69 6e 74 | 2d 66 69 6c 65 2d 6e 61 |" comint|-file-na|
|000032c0| 6d 65 2d 70 72 65 66 69 | 78 20 28 62 79 74 65 2d |me-prefi|x (byte-|
|000032d0| 63 6f 64 65 20 22 c0 09 | 40 21 88 09 41 12 c3 20 |code "..|@!..A.. |
|000032e0| 87 22 20 5b 63 64 20 64 | 73 20 73 68 65 6c 6c 2d |." [cd d|s shell-|
|000032f0| 64 69 72 73 74 61 63 6b | 20 73 68 65 6c 6c 2d 64 |dirstack| shell-d|
|00003300| 69 72 73 74 61 63 6b 2d | 6d 65 73 73 61 67 65 5d |irstack-|message]|
|00003310| 20 32 29 20 28 28 65 72 | 72 6f 72 20 28 6d 65 73 | 2) ((er|ror (mes|
|00003320| 73 61 67 65 20 22 43 6f | 75 6c 64 6e 27 74 20 63 |sage "Co|uldn't c|
|00003330| 64 2e 22 29 29 29 5d 20 | 35 20 22 5c 0a 52 65 73 |d.")))] |5 "\.Res|
|00003340| 79 6e 63 20 74 68 65 20 | 62 75 66 66 65 72 27 73 |ync the |buffer's|
|00003350| 20 69 64 65 61 20 6f 66 | 20 74 68 65 20 63 75 72 | idea of| the cur|
|00003360| 72 65 6e 74 20 64 69 72 | 65 63 74 6f 72 79 20 73 |rent dir|ectory s|
|00003370| 74 61 63 6b 2e 0a 54 68 | 69 73 20 63 6f 6d 6d 61 |tack..Th|is comma|
|00003380| 6e 64 20 71 75 65 72 69 | 65 73 20 74 68 65 20 73 |nd queri|es the s|
|00003390| 68 65 6c 6c 20 77 69 74 | 68 20 74 68 65 20 63 6f |hell wit|h the co|
|000033a0| 6d 6d 61 6e 64 20 62 6f | 75 6e 64 20 74 6f 20 0a |mmand bo|und to .|
|000033b0| 60 73 68 65 6c 6c 2d 64 | 69 72 73 74 61 63 6b 2d |`shell-d|irstack-|
|000033c0| 71 75 65 72 79 27 20 28 | 64 65 66 61 75 6c 74 20 |query' (|default |
|000033d0| 5c 22 64 69 72 73 5c 22 | 29 2c 20 72 65 61 64 73 |\"dirs\"|), reads|
|000033e0| 20 74 68 65 20 6e 65 78 | 74 0a 6c 69 6e 65 20 6f | the nex|t.line o|
|000033f0| 75 74 70 75 74 20 61 6e | 64 20 70 61 72 73 65 73 |utput an|d parses|
|00003400| 20 69 74 20 74 6f 20 66 | 6f 72 6d 20 74 68 65 20 | it to f|orm the |
|00003410| 6e 65 77 20 64 69 72 65 | 63 74 6f 72 79 20 73 74 |new dire|ctory st|
|00003420| 61 63 6b 2e 0a 44 4f 4e | 27 54 20 69 73 73 75 65 |ack..DON|'T issue|
|00003430| 20 74 68 69 73 20 63 6f | 6d 6d 61 6e 64 20 75 6e | this co|mmand un|
|00003440| 6c 65 73 73 20 74 68 65 | 20 62 75 66 66 65 72 20 |less the| buffer |
|00003450| 69 73 20 61 74 20 61 20 | 73 68 65 6c 6c 20 70 72 |is at a |shell pr|
|00003460| 6f 6d 70 74 2e 0a 41 6c | 73 6f 2c 20 6e 6f 74 65 |ompt..Al|so, note|
|00003470| 20 74 68 61 74 20 69 66 | 20 73 6f 6d 65 20 6f 74 | that if| some ot|
|00003480| 68 65 72 20 73 75 62 70 | 72 6f 63 65 73 73 20 64 |her subp|rocess d|
|00003490| 65 63 69 64 65 73 20 74 | 6f 20 64 6f 20 6f 75 74 |ecides t|o do out|
|000034a0| 70 75 74 0a 69 6d 6d 65 | 64 69 61 74 65 6c 79 20 |put.imme|diately |
|000034b0| 61 66 74 65 72 20 74 68 | 65 20 71 75 65 72 79 2c |after th|e query,|
|000034c0| 20 69 74 73 20 6f 75 74 | 70 75 74 20 77 69 6c 6c | its out|put will|
|000034d0| 20 62 65 20 74 61 6b 65 | 6e 20 61 73 20 74 68 65 | be take|n as the|
|000034e0| 0a 6e 65 77 20 64 69 72 | 65 63 74 6f 72 79 20 73 |.new dir|ectory s|
|000034f0| 74 61 63 6b 20 2d 2d 20 | 79 6f 75 20 6c 6f 73 65 |tack -- |you lose|
|00003500| 2e 20 49 66 20 74 68 69 | 73 20 68 61 70 70 65 6e |. If thi|s happen|
|00003510| 73 2c 20 6a 75 73 74 20 | 64 6f 20 74 68 65 0a 63 |s, just |do the.c|
|00003520| 6f 6d 6d 61 6e 64 20 61 | 67 61 69 6e 2e 22 20 6e |ommand a|gain." n|
|00003530| 69 6c 5d 29 0a 28 62 79 | 74 65 2d 63 6f 64 65 20 |il]).(by|te-code |
|00003540| 22 c0 c1 c2 5c 22 88 c0 | c3 c4 5c 22 87 22 20 5b |"...\"..|..\"." [|
|00003550| 64 65 66 61 6c 69 61 73 | 20 64 69 72 73 20 73 68 |defalias| dirs sh|
|00003560| 65 6c 6c 2d 72 65 73 79 | 6e 63 2d 64 69 72 73 20 |ell-resy|nc-dirs |
|00003570| 73 68 65 6c 6c 2d 64 69 | 72 73 74 61 63 6b 2d 6d |shell-di|rstack-m|
|00003580| 65 73 73 61 67 65 20 23 | 5b 6e 69 6c 20 22 c0 19 |essage #|[nil "..|
|00003590| 5c 6e 0b 42 1c c5 0e 06 | c7 50 21 89 1e 08 47 1e |\n.B....|.P!...G.|
|000035a0| 09 5c 66 83 75 00 5c 66 | 40 89 1e 5c 6e 47 0e 09 |.\f.u.\f|@..\nG..|
|000035b0| 59 83 38 00 0e 08 0e 5c | 6e cb 0e 09 4f 98 83 38 |Y.8....\|n...O..8|
|000035c0| 00 c7 0e 5c 6e 0e 09 cc | 4f 50 16 5c 6e 0e 06 83 |...\n...|OP.\n...|
|000035d0| 66 00 0e 5c 6e 47 0e 06 | 47 59 83 66 00 0e 06 0e |f..\nG..|GY.f....|
|000035e0| 5c 6e cb 0e 06 47 4f 98 | 83 66 00 0e 5c 6e 0e 06 |\n...GO.|.f..\n..|
|000035f0| 47 cc 4f 89 16 5c 6e 83 | 66 00 5c 66 0e 5c 6e a0 |G.O..\n.|f.\f.\n.|
|00003600| 88 09 cd 0e 5c 6e 21 ce | 51 11 5c 66 41 14 29 82 |....\n!.|Q.\fA.).|
|00003610| 12 00 cf 09 21 2c 87 22 | 20 5b 22 22 20 6d 73 67 |....!,."| ["" msg|
|00003620| 20 64 65 66 61 75 6c 74 | 2d 64 69 72 65 63 74 6f | default|-directo|
|00003630| 72 79 20 73 68 65 6c 6c | 2d 64 69 72 73 74 61 63 |ry shell|-dirstac|
|00003640| 6b 20 64 73 20 65 78 70 | 61 6e 64 2d 66 69 6c 65 |k ds exp|and-file|
|00003650| 2d 6e 61 6d 65 20 63 6f | 6d 69 6e 74 2d 66 69 6c |-name co|mint-fil|
|00003660| 65 2d 6e 61 6d 65 2d 70 | 72 65 66 69 78 20 22 7e |e-name-p|refix "~|
|00003670| 2f 22 20 68 6f 6d 65 20 | 68 6f 6d 65 6c 65 6e 20 |/" home |homelen |
|00003680| 64 69 72 20 30 20 6e 69 | 6c 20 64 69 72 65 63 74 |dir 0 ni|l direct|
|00003690| 6f 72 79 2d 66 69 6c 65 | 2d 6e 61 6d 65 20 22 20 |ory-file|-name " |
|000036a0| 22 20 6d 65 73 73 61 67 | 65 5d 20 35 5d 5d 20 33 |" messag|e] 5]] 3|
|000036b0| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 73 68 65 |).(defal|ias 'she|
|000036c0| 6c 6c 2d 66 6f 72 77 61 | 72 64 2d 63 6f 6d 6d 61 |ll-forwa|rd-comma|
|000036d0| 6e 64 20 23 5b 28 26 6f | 70 74 69 6f 6e 61 6c 20 |nd #[(&o|ptional |
|000036e0| 61 72 67 29 20 22 8a c0 | 7f 88 60 29 19 c2 0b c4 |arg) "..|..`)....|
|000036f0| 50 09 c5 0e 06 24 85 16 | 00 c7 c8 21 29 87 22 20 |P....$..|...!)." |
|00003700| 5b 6e 69 6c 20 6c 69 6d | 69 74 20 72 65 2d 73 65 |[nil lim|it re-se|
|00003710| 61 72 63 68 2d 66 6f 72 | 77 61 72 64 20 73 68 65 |arch-for|ward she|
|00003720| 6c 6c 2d 63 6f 6d 6d 61 | 6e 64 2d 72 65 67 65 78 |ll-comma|nd-regex|
|00003730| 70 20 22 5c 5c 28 5b 3b | 26 7c 5d 5b 09 20 5d 2a |p "\\([;|&|][. ]*|
|00003740| 5c 5c 29 2b 22 20 6d 6f | 76 65 20 61 72 67 20 73 |\\)+" mo|ve arg s|
|00003750| 6b 69 70 2d 73 79 6e 74 | 61 78 2d 62 61 63 6b 77 |kip-synt|ax-backw|
|00003760| 61 72 64 20 22 20 22 5d | 20 35 20 22 5c 0a 4d 6f |ard " "]| 5 "\.Mo|
|00003770| 76 65 20 66 6f 72 77 61 | 72 64 20 61 63 72 6f 73 |ve forwa|rd acros|
|00003780| 73 20 41 52 47 20 73 68 | 65 6c 6c 20 63 6f 6d 6d |s ARG sh|ell comm|
|00003790| 61 6e 64 28 73 29 2e 20 | 20 44 6f 65 73 20 6e 6f |and(s). | Does no|
|000037a0| 74 20 63 72 6f 73 73 20 | 6c 69 6e 65 73 2e 0a 53 |t cross |lines..S|
|000037b0| 65 65 20 60 73 68 65 6c | 6c 2d 63 6f 6d 6d 61 6e |ee `shel|l-comman|
|000037c0| 64 2d 72 65 67 65 78 70 | 27 2e 22 20 22 70 22 5d |d-regexp|'." "p"]|
|000037d0| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 73 68 65 |).(defal|ias 'she|
|000037e0| 6c 6c 2d 62 61 63 6b 77 | 61 72 64 2d 63 6f 6d 6d |ll-backw|ard-comm|
|000037f0| 61 6e 64 20 23 5b 28 26 | 6f 70 74 69 6f 6e 61 6c |and #[(&|optional|
|00003800| 20 61 72 67 29 20 22 8a | c0 c1 21 88 60 29 89 1a | arg) ".|..!.`)..|
|00003810| 60 56 83 15 00 8a c3 79 | 88 60 12 29 c4 c5 5c 6e |`V.....y|.`.)..\n|
|00003820| 5c 22 88 c6 c7 c8 0e 09 | 5c 22 5c 6e ca 0e 0b 24 |\"......|\"\n...$|
|00003830| 85 2f 00 cc 94 62 88 cd | c1 77 29 87 22 20 5b 63 |./...b..|.w)." [c|
|00003840| 6f 6d 69 6e 74 2d 62 6f | 6c 20 6e 69 6c 20 6c 69 |omint-bo|l nil li|
|00003850| 6d 69 74 20 30 20 73 6b | 69 70 2d 73 79 6e 74 61 |mit 0 sk|ip-synta|
|00003860| 78 2d 62 61 63 6b 77 61 | 72 64 20 22 20 22 20 72 |x-backwa|rd " " r|
|00003870| 65 2d 73 65 61 72 63 68 | 2d 62 61 63 6b 77 61 72 |e-search|-backwar|
|00003880| 64 20 66 6f 72 6d 61 74 | 20 22 5b 3b 26 7c 5d 2b |d format| "[;&|]+|
|00003890| 5b 09 20 5d 2a 5c 5c 28 | 25 73 5c 5c 29 22 20 73 |[. ]*\\(|%s\\)" s|
|000038a0| 68 65 6c 6c 2d 63 6f 6d | 6d 61 6e 64 2d 72 65 67 |hell-com|mand-reg|
|000038b0| 65 78 70 20 6d 6f 76 65 | 20 61 72 67 20 31 20 22 |exp move| arg 1 "|
|000038c0| 3b 26 7c 22 5d 20 36 20 | 22 5c 0a 4d 6f 76 65 20 |;&|"] 6 |"\.Move |
|000038d0| 62 61 63 6b 77 61 72 64 | 20 61 63 72 6f 73 73 20 |backward| across |
|000038e0| 41 52 47 20 73 68 65 6c | 6c 20 63 6f 6d 6d 61 6e |ARG shel|l comman|
|000038f0| 64 28 73 29 2e 20 20 44 | 6f 65 73 20 6e 6f 74 20 |d(s). D|oes not |
|00003900| 63 72 6f 73 73 20 6c 69 | 6e 65 73 2e 0a 53 65 65 |cross li|nes..See|
|00003910| 20 60 73 68 65 6c 6c 2d | 63 6f 6d 6d 61 6e 64 2d | `shell-|command-|
|00003920| 72 65 67 65 78 70 27 2e | 22 20 22 70 22 5d 29 0a |regexp'.|" "p"]).|
|00003930| 28 64 65 66 61 6c 69 61 | 73 20 27 73 68 65 6c 6c |(defalia|s 'shell|
|00003940| 2d 64 79 6e 61 6d 69 63 | 2d 63 6f 6d 70 6c 65 74 |-dynamic|-complet|
|00003950| 65 2d 63 6f 6d 6d 61 6e | 64 20 23 5b 6e 69 6c 20 |e-comman|d #[nil |
|00003960| 22 c0 20 89 19 85 28 00 | c2 20 1b c4 8e c5 c6 09 |". ...(.|. ......|
|00003970| 5c 22 2a 3f 85 28 00 c7 | 94 8a c8 c9 21 88 60 29 |\"*?.(..|....!.`)|
|00003980| 3d 85 28 00 ca cb 21 88 | cc 20 29 87 22 20 5b 63 |=.(...!.|. )." [c|
|00003990| 6f 6d 69 6e 74 2d 6d 61 | 74 63 68 2d 70 61 72 74 |omint-ma|tch-part|
|000039a0| 69 61 6c 2d 66 69 6c 65 | 6e 61 6d 65 20 66 69 6c |ial-file|name fil|
|000039b0| 65 6e 61 6d 65 20 6d 61 | 74 63 68 2d 64 61 74 61 |ename ma|tch-data|
|000039c0| 20 6d 61 74 63 68 2d 64 | 61 74 61 20 28 28 73 74 | match-d|ata ((st|
|000039d0| 6f 72 65 2d 6d 61 74 63 | 68 2d 64 61 74 61 20 6d |ore-matc|h-data m|
|000039e0| 61 74 63 68 2d 64 61 74 | 61 29 29 20 73 74 72 69 |atch-dat|a)) stri|
|000039f0| 6e 67 2d 6d 61 74 63 68 | 20 22 5b 7e 2f 5d 22 20 |ng-match| "[~/]" |
|00003a00| 30 20 73 68 65 6c 6c 2d | 62 61 63 6b 77 61 72 64 |0 shell-|backward|
|00003a10| 2d 63 6f 6d 6d 61 6e 64 | 20 31 20 6d 65 73 73 61 |-command| 1 messa|
|00003a20| 67 65 20 22 43 6f 6d 70 | 6c 65 74 69 6e 67 20 63 |ge "Comp|leting c|
|00003a30| 6f 6d 6d 61 6e 64 20 6e | 61 6d 65 2e 2e 2e 22 20 |ommand n|ame..." |
|00003a40| 73 68 65 6c 6c 2d 64 79 | 6e 61 6d 69 63 2d 63 6f |shell-dy|namic-co|
|00003a50| 6d 70 6c 65 74 65 2d 61 | 73 2d 63 6f 6d 6d 61 6e |mplete-a|s-comman|
|00003a60| 64 5d 20 34 20 22 5c 0a | 44 79 6e 61 6d 69 63 61 |d] 4 "\.|Dynamica|
|00003a70| 6c 6c 79 20 63 6f 6d 70 | 6c 65 74 65 20 74 68 65 |lly comp|lete the|
|00003a80| 20 63 6f 6d 6d 61 6e 64 | 20 61 74 20 70 6f 69 6e | command| at poin|
|00003a90| 74 2e 0a 54 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |t..This |function|
|00003aa0| 20 69 73 20 73 69 6d 69 | 6c 61 72 20 74 6f 20 60 | is simi|lar to `|
|00003ab0| 63 6f 6d 69 6e 74 2d 64 | 79 6e 61 6d 69 63 2d 63 |comint-d|ynamic-c|
|00003ac0| 6f 6d 70 6c 65 74 65 2d | 66 69 6c 65 6e 61 6d 65 |omplete-|filename|
|00003ad0| 27 2c 20 65 78 63 65 70 | 74 20 74 68 61 74 20 69 |', excep|t that i|
|00003ae0| 74 0a 73 65 61 72 63 68 | 65 73 20 60 65 78 65 63 |t.search|es `exec|
|00003af0| 2d 70 61 74 68 27 20 28 | 6d 69 6e 75 73 20 74 68 |-path' (|minus th|
|00003b00| 65 20 74 72 61 69 6c 69 | 6e 67 20 65 6d 61 63 73 |e traili|ng emacs|
|00003b10| 20 6c 69 62 72 61 72 79 | 20 70 61 74 68 29 20 66 | library| path) f|
|00003b20| 6f 72 20 63 6f 6d 70 6c | 65 74 69 6f 6e 0a 63 61 |or compl|etion.ca|
|00003b30| 6e 64 69 64 61 74 65 73 | 2e 20 20 4e 6f 74 65 20 |ndidates|. Note |
|00003b40| 74 68 61 74 20 74 68 69 | 73 20 6d 61 79 20 6e 6f |that thi|s may no|
|00003b50| 74 20 62 65 20 74 68 65 | 20 73 61 6d 65 20 61 73 |t be the| same as|
|00003b60| 20 74 68 65 20 73 68 65 | 6c 6c 27 73 20 69 64 65 | the she|ll's ide|
|00003b70| 61 20 6f 66 20 74 68 65 | 0a 70 61 74 68 2e 0a 0a |a of the|.path...|
|00003b80| 43 6f 6d 70 6c 65 74 69 | 6f 6e 20 69 73 20 64 65 |Completi|on is de|
|00003b90| 70 65 6e 64 65 6e 74 20 | 6f 6e 20 74 68 65 20 76 |pendent |on the v|
|00003ba0| 61 6c 75 65 20 6f 66 20 | 60 73 68 65 6c 6c 2d 63 |alue of |`shell-c|
|00003bb0| 6f 6d 70 6c 65 74 69 6f | 6e 2d 65 78 65 63 6f 6e |ompletio|n-execon|
|00003bc0| 6c 79 27 2c 20 70 6c 75 | 73 0a 74 68 6f 73 65 20 |ly', plu|s.those |
|00003bd0| 74 68 61 74 20 65 66 66 | 65 63 74 20 66 69 6c 65 |that eff|ect file|
|00003be0| 20 63 6f 6d 70 6c 65 74 | 69 6f 6e 2e 20 20 53 65 | complet|ion. Se|
|00003bf0| 65 20 60 73 68 65 6c 6c | 2d 64 79 6e 61 6d 69 63 |e `shell|-dynamic|
|00003c00| 2d 63 6f 6d 70 6c 65 74 | 65 2d 61 73 2d 63 6f 6d |-complet|e-as-com|
|00003c10| 6d 61 6e 64 27 2e 0a 0a | 52 65 74 75 72 6e 73 20 |mand'...|Returns |
|00003c20| 74 20 69 66 20 73 75 63 | 63 65 73 73 66 75 6c 2e |t if suc|cessful.|
|00003c30| 22 20 6e 69 6c 5d 29 0a | 28 64 65 66 61 6c 69 61 |" nil]).|(defalia|
|00003c40| 73 20 27 73 68 65 6c 6c | 2d 64 79 6e 61 6d 69 63 |s 'shell|-dynamic|
|00003c50| 2d 63 6f 6d 70 6c 65 74 | 65 2d 61 73 2d 63 6f 6d |-complet|e-as-com|
|00003c60| 6d 61 6e 64 20 23 5b 6e | 69 6c 20 22 c0 20 86 06 |mand #[n|il ". ..|
|00003c70| 00 c1 1a c3 5c 6e 21 1c | c5 0e 06 21 41 1e 07 c8 |....\n!.|...!A...|
|00003c80| c9 0e 5c 6e 21 21 1e 0b | 0e 5c 66 85 25 00 cd ce |..\n!!..|.\f.%...|
|00003c90| 0e 5c 66 cf 23 1e 10 c1 | 1e 11 d2 1e 13 c1 1e 14 |.\f.#...|........|
|00003ca0| c1 1e 15 d2 1e 16 0e 07 | 83 b0 00 c8 d7 0e 07 40 |........|.......@|
|00003cb0| 86 44 00 d8 21 21 16 11 | d9 0e 11 21 85 54 00 da |.D..!!..|...!.T..|
|00003cc0| 5c 66 0e 11 5c 22 89 16 | 13 83 a7 00 0e 13 40 16 |\f..\"..|......@.|
|00003cd0| 14 0e 11 0e 14 50 16 15 | 0e 14 0e 16 9d 84 9e 00 |.....P..|........|
|00003ce0| 0e 10 83 7c 00 db 0e 10 | 0e 14 5c 22 84 9e 00 0e |...|....|..\"....|
|00003cf0| 11 0e 0b 98 84 8b 00 dc | 0e 15 21 84 9e 00 0e 1d |........|..!.....|
|00003d00| 83 97 00 de 0e 15 21 83 | 9e 00 0e 14 0e 16 42 16 |......!.|......B.|
|00003d10| 16 0e 13 41 89 16 13 84 | 5a 00 0e 07 41 89 16 07 |...A....|Z...A...|
|00003d20| 84 3b 00 d2 1e 1f e0 5c | 66 0e 16 5c 22 29 89 1e |.;.....\|f..\")..|
|00003d30| 21 e2 3e 83 d0 00 0e 1f | 83 d0 00 dc c0 20 21 84 |!.>.....|..... !.|
|00003d40| d0 00 e3 63 88 0e 21 2e | 0b 87 22 20 5b 63 6f 6d |...c..!.|.." [com|
|00003d50| 69 6e 74 2d 6d 61 74 63 | 68 2d 70 61 72 74 69 61 |int-matc|h-partia|
|00003d60| 6c 2d 66 69 6c 65 6e 61 | 6d 65 20 22 22 20 66 69 |l-filena|me "" fi|
|00003d70| 6c 65 6e 61 6d 65 20 66 | 69 6c 65 2d 6e 61 6d 65 |lename f|ile-name|
|00003d80| 2d 6e 6f 6e 64 69 72 65 | 63 74 6f 72 79 20 70 61 |-nondire|ctory pa|
|00003d90| 74 68 6e 6f 6e 64 69 72 | 20 72 65 76 65 72 73 65 |thnondir| reverse|
|00003da0| 20 65 78 65 63 2d 70 61 | 74 68 20 70 61 74 68 73 | exec-pa|th paths|
|00003db0| 20 66 69 6c 65 2d 6e 61 | 6d 65 2d 61 73 2d 64 69 | file-na|me-as-di|
|00003dc0| 72 65 63 74 6f 72 79 20 | 65 78 70 61 6e 64 2d 66 |rectory |expand-f|
|00003dd0| 69 6c 65 2d 6e 61 6d 65 | 20 64 65 66 61 75 6c 74 |ile-name| default|
|00003de0| 2d 64 69 72 65 63 74 6f | 72 79 20 63 77 64 20 63 |-directo|ry cwd c|
|00003df0| 6f 6d 69 6e 74 2d 63 6f | 6d 70 6c 65 74 69 6f 6e |omint-co|mpletion|
|00003e00| 2d 66 69 67 6e 6f 72 65 | 20 6d 61 70 63 6f 6e 63 |-fignore| mapconc|
|00003e10| 61 74 20 23 5b 28 78 29 | 20 22 c0 09 21 c2 50 87 |at #[(x)| "..!.P.|
|00003e20| 22 20 5b 72 65 67 65 78 | 70 2d 71 75 6f 74 65 20 |" [regex|p-quote |
|00003e30| 78 20 22 24 22 5d 20 32 | 5d 20 22 5c 5c 7c 22 20 |x "$"] 2|] "\\|" |
|00003e40| 69 67 6e 6f 72 65 64 2d | 65 78 74 65 6e 73 69 6f |ignored-|extensio|
|00003e50| 6e 73 20 70 61 74 68 20 | 6e 69 6c 20 63 6f 6d 70 |ns path |nil comp|
|00003e60| 73 2d 69 6e 2d 70 61 74 | 68 20 66 69 6c 65 20 66 |s-in-pat|h file f|
|00003e70| 69 6c 65 70 61 74 68 20 | 63 6f 6d 70 6c 65 74 69 |ilepath |completi|
|00003e80| 6f 6e 73 20 63 6f 6d 69 | 6e 74 2d 64 69 72 65 63 |ons comi|nt-direc|
|00003e90| 74 6f 72 79 20 22 2e 22 | 20 66 69 6c 65 2d 61 63 |tory "."| file-ac|
|00003ea0| 63 65 73 73 69 62 6c 65 | 2d 64 69 72 65 63 74 6f |cessible|-directo|
|00003eb0| 72 79 2d 70 20 66 69 6c | 65 2d 6e 61 6d 65 2d 61 |ry-p fil|e-name-a|
|00003ec0| 6c 6c 2d 63 6f 6d 70 6c | 65 74 69 6f 6e 73 20 73 |ll-compl|etions s|
|00003ed0| 74 72 69 6e 67 2d 6d 61 | 74 63 68 20 66 69 6c 65 |tring-ma|tch file|
|00003ee0| 2d 64 69 72 65 63 74 6f | 72 79 2d 70 20 73 68 65 |-directo|ry-p she|
|00003ef0| 6c 6c 2d 63 6f 6d 70 6c | 65 74 69 6f 6e 2d 65 78 |ll-compl|etion-ex|
|00003f00| 65 63 6f 6e 6c 79 20 66 | 69 6c 65 2d 65 78 65 63 |econly f|ile-exec|
|00003f10| 75 74 61 62 6c 65 2d 70 | 20 63 6f 6d 69 6e 74 2d |utable-p| comint-|
|00003f20| 63 6f 6d 70 6c 65 74 69 | 6f 6e 2d 61 64 64 73 75 |completi|on-addsu|
|00003f30| 66 66 69 78 20 63 6f 6d | 69 6e 74 2d 64 79 6e 61 |ffix com|int-dyna|
|00003f40| 6d 69 63 2d 73 69 6d 70 | 6c 65 2d 63 6f 6d 70 6c |mic-simp|le-compl|
|00003f50| 65 74 65 20 73 75 63 63 | 65 73 73 20 28 73 6f 6c |ete succ|ess (sol|
|00003f60| 65 20 73 68 6f 72 74 65 | 73 74 29 20 22 20 22 5d |e shorte|st) " "]|
|00003f70| 20 35 20 22 5c 0a 44 79 | 6e 61 6d 69 63 61 6c 6c | 5 "\.Dy|namicall|
|00003f80| 79 20 63 6f 6d 70 6c 65 | 74 65 20 61 74 20 70 6f |y comple|te at po|
|00003f90| 69 6e 74 20 61 73 20 61 | 20 63 6f 6d 6d 61 6e 64 |int as a| command|
|00003fa0| 2e 0a 53 65 65 20 60 73 | 68 65 6c 6c 2d 64 79 6e |..See `s|hell-dyn|
|00003fb0| 61 6d 69 63 2d 63 6f 6d | 70 6c 65 74 65 2d 66 69 |amic-com|plete-fi|
|00003fc0| 6c 65 6e 61 6d 65 27 2e | 20 20 52 65 74 75 72 6e |lename'.| Return|
|00003fd0| 73 20 74 20 69 66 20 73 | 75 63 63 65 73 73 66 75 |s t if s|uccessfu|
|00003fe0| 6c 2e 22 5d 29 0a 28 64 | 65 66 61 6c 69 61 73 20 |l."]).(d|efalias |
|00003ff0| 27 73 68 65 6c 6c 2d 6d | 61 74 63 68 2d 70 61 72 |'shell-m|atch-par|
|00004000| 74 69 61 6c 2d 76 61 72 | 69 61 62 6c 65 20 23 5b |tial-var|iable #[|
|00004010| 6e 69 6c 20 22 8a 60 18 | c1 c2 c3 c4 23 83 14 00 |nil ".`.|....#...|
|00004020| c5 c6 21 84 14 00 c7 75 | 88 6c 86 1b 00 c5 c8 21 |..!....u|.l.....!|
|00004030| 3f 85 29 00 c9 ca 08 5c | 22 88 cb 94 cb 95 7b 2a |?.)....\|".....{*|
|00004040| 87 22 20 5b 6c 69 6d 69 | 74 20 72 65 2d 73 65 61 |." [limi|t re-sea|
|00004050| 72 63 68 2d 62 61 63 6b | 77 61 72 64 20 22 5b 5e |rch-back|ward "[^|
|00004060| 41 2d 5a 61 2d 7a 30 2d | 39 5f 7b 7d 5d 22 20 6e |A-Za-z0-|9_{}]" n|
|00004070| 69 6c 20 6d 6f 76 65 20 | 6c 6f 6f 6b 69 6e 67 2d |il move |looking-|
|00004080| 61 74 20 22 5c 5c 24 22 | 20 31 20 22 5b 5e 41 2d |at "\\$"| 1 "[^A-|
|00004090| 5a 61 2d 7a 30 2d 39 5f | 7b 7d 24 5d 22 20 72 65 |Za-z0-9_|{}$]" re|
|000040a0| 2d 73 65 61 72 63 68 2d | 66 6f 72 77 61 72 64 20 |-search-|forward |
|000040b0| 22 5c 5c 24 3f 7b 3f 5b | 41 2d 5a 61 2d 7a 30 2d |"\\$?{?[|A-Za-z0-|
|000040c0| 39 5f 5d 2a 7d 3f 22 20 | 30 5d 20 34 20 22 5c 0a |9_]*}?" |0] 4 "\.|
|000040d0| 52 65 74 75 72 6e 20 74 | 68 65 20 76 61 72 69 61 |Return t|he varia|
|000040e0| 62 6c 65 20 61 74 20 70 | 6f 69 6e 74 2c 20 6f 72 |ble at p|oint, or|
|000040f0| 20 6e 69 6c 20 69 66 20 | 6e 6f 6e 20 69 73 20 66 | nil if |non is f|
|00004100| 6f 75 6e 64 2e 22 5d 29 | 0a 28 64 65 66 61 6c 69 |ound."])|.(defali|
|00004110| 61 73 20 27 73 68 65 6c | 6c 2d 64 79 6e 61 6d 69 |as 'shel|l-dynami|
|00004120| 63 2d 63 6f 6d 70 6c 65 | 74 65 2d 65 6e 76 69 72 |c-comple|te-envir|
|00004130| 6f 6e 6d 65 6e 74 2d 76 | 61 72 69 61 62 6c 65 20 |onment-v|ariable |
|00004140| 23 5b 6e 69 6c 20 22 c0 | 20 89 19 85 14 00 c2 c3 |#[nil ".| .......|
|00004150| 09 5c 22 85 14 00 c4 c5 | 21 88 c6 20 29 87 22 20 |.\".....|!.. )." |
|00004160| 5b 73 68 65 6c 6c 2d 6d | 61 74 63 68 2d 70 61 72 |[shell-m|atch-par|
|00004170| 74 69 61 6c 2d 76 61 72 | 69 61 62 6c 65 20 76 61 |tial-var|iable va|
|00004180| 72 69 61 62 6c 65 20 73 | 74 72 69 6e 67 2d 6d 61 |riable s|tring-ma|
|00004190| 74 63 68 20 22 5e 5c 5c | 24 22 20 6d 65 73 73 61 |tch "^\\|$" messa|
|000041a0| 67 65 20 22 43 6f 6d 70 | 6c 65 74 69 6e 67 20 76 |ge "Comp|leting v|
|000041b0| 61 72 69 61 62 6c 65 20 | 6e 61 6d 65 2e 2e 2e 22 |ariable |name..."|
|000041c0| 20 73 68 65 6c 6c 2d 64 | 79 6e 61 6d 69 63 2d 63 | shell-d|ynamic-c|
|000041d0| 6f 6d 70 6c 65 74 65 2d | 61 73 2d 65 6e 76 69 72 |omplete-|as-envir|
|000041e0| 6f 6e 6d 65 6e 74 2d 76 | 61 72 69 61 62 6c 65 5d |onment-v|ariable]|
|000041f0| 20 34 20 22 5c 0a 44 79 | 6e 61 6d 69 63 61 6c 6c | 4 "\.Dy|namicall|
|00004200| 79 20 63 6f 6d 70 6c 65 | 74 65 20 74 68 65 20 65 |y comple|te the e|
|00004210| 6e 76 69 72 6f 6e 6d 65 | 6e 74 20 76 61 72 69 61 |nvironme|nt varia|
|00004220| 62 6c 65 20 61 74 20 70 | 6f 69 6e 74 2e 0a 43 6f |ble at p|oint..Co|
|00004230| 6d 70 6c 65 74 65 73 20 | 69 66 20 61 66 74 65 72 |mpletes |if after|
|00004240| 20 61 20 76 61 72 69 61 | 62 6c 65 2c 20 69 2e 65 | a varia|ble, i.e|
|00004250| 2e 2c 20 69 66 20 69 74 | 20 73 74 61 72 74 73 20 |., if it| starts |
|00004260| 77 69 74 68 20 61 20 5c | 22 24 5c 22 2e 0a 53 65 |with a \|"$\"..Se|
|00004270| 65 20 60 73 68 65 6c 6c | 2d 64 79 6e 61 6d 69 63 |e `shell|-dynamic|
|00004280| 2d 63 6f 6d 70 6c 65 74 | 65 2d 61 73 2d 65 6e 76 |-complet|e-as-env|
|00004290| 69 72 6f 6e 6d 65 6e 74 | 2d 76 61 72 69 61 62 6c |ironment|-variabl|
|000042a0| 65 27 2e 0a 0a 54 68 69 | 73 20 66 75 6e 63 74 69 |e'...Thi|s functi|
|000042b0| 6f 6e 20 69 73 20 73 69 | 6d 69 6c 61 72 20 74 6f |on is si|milar to|
|000042c0| 20 60 63 6f 6d 69 6e 74 | 2d 64 79 6e 61 6d 69 63 | `comint|-dynamic|
|000042d0| 2d 63 6f 6d 70 6c 65 74 | 65 2d 66 69 6c 65 6e 61 |-complet|e-filena|
|000042e0| 6d 65 27 2c 20 65 78 63 | 65 70 74 20 74 68 61 74 |me', exc|ept that|
|000042f0| 20 69 74 0a 73 65 61 72 | 63 68 65 73 20 60 70 72 | it.sear|ches `pr|
|00004300| 6f 63 65 73 73 2d 65 6e | 76 69 72 6f 6e 6d 65 6e |ocess-en|vironmen|
|00004310| 74 27 20 66 6f 72 20 63 | 6f 6d 70 6c 65 74 69 6f |t' for c|ompletio|
|00004320| 6e 20 63 61 6e 64 69 64 | 61 74 65 73 2e 20 20 4e |n candid|ates. N|
|00004330| 6f 74 65 20 74 68 61 74 | 20 74 68 69 73 20 6d 61 |ote that| this ma|
|00004340| 79 0a 6e 6f 74 20 62 65 | 20 74 68 65 20 73 61 6d |y.not be| the sam|
|00004350| 65 20 61 73 20 74 68 65 | 20 69 6e 74 65 72 70 72 |e as the| interpr|
|00004360| 65 74 65 72 27 73 20 69 | 64 65 61 20 6f 66 20 76 |eter's i|dea of v|
|00004370| 61 72 69 61 62 6c 65 20 | 6e 61 6d 65 73 2e 20 20 |ariable |names. |
|00004380| 54 68 65 20 6d 61 69 6e | 20 70 72 6f 62 6c 65 6d |The main| problem|
|00004390| 0a 77 69 74 68 20 74 68 | 69 73 20 74 79 70 65 20 |.with th|is type |
|000043a0| 6f 66 20 63 6f 6d 70 6c | 65 74 69 6f 6e 20 69 73 |of compl|etion is|
|000043b0| 20 74 68 61 74 20 60 70 | 72 6f 63 65 73 73 2d 65 | that `p|rocess-e|
|000043c0| 6e 76 69 72 6f 6e 6d 65 | 6e 74 27 20 69 73 20 74 |nvironme|nt' is t|
|000043d0| 68 65 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 0a 77 |he envir|onment.w|
|000043e0| 68 69 63 68 20 45 6d 61 | 63 73 20 73 74 61 72 74 |hich Ema|cs start|
|000043f0| 65 64 20 77 69 74 68 2e | 20 20 45 6d 61 63 73 20 |ed with.| Emacs |
|00004400| 64 6f 65 73 20 6e 6f 74 | 20 74 72 61 63 6b 20 63 |does not| track c|
|00004410| 68 61 6e 67 65 73 20 74 | 6f 20 74 68 65 20 65 6e |hanges t|o the en|
|00004420| 76 69 72 6f 6e 6d 65 6e | 74 20 6d 61 64 65 0a 62 |vironmen|t made.b|
|00004430| 79 20 74 68 65 20 69 6e | 74 65 72 70 72 65 74 65 |y the in|terprete|
|00004440| 72 2e 20 20 50 65 72 68 | 61 70 73 20 69 74 20 77 |r. Perh|aps it w|
|00004450| 6f 75 6c 64 20 62 65 20 | 6d 6f 72 65 20 61 63 63 |ould be |more acc|
|00004460| 75 72 61 74 65 20 69 66 | 20 74 68 69 73 20 66 75 |urate if| this fu|
|00004470| 6e 63 74 69 6f 6e 20 77 | 61 73 0a 63 61 6c 6c 65 |nction w|as.calle|
|00004480| 64 20 60 73 68 65 6c 6c | 2d 64 79 6e 61 6d 69 63 |d `shell|-dynamic|
|00004490| 2d 63 6f 6d 70 6c 65 74 | 65 2d 70 72 6f 63 65 73 |-complet|e-proces|
|000044a0| 73 2d 65 6e 76 69 72 6f | 6e 6d 65 6e 74 2d 76 61 |s-enviro|nment-va|
|000044b0| 72 69 61 62 6c 65 27 2e | 0a 0a 52 65 74 75 72 6e |riable'.|..Return|
|000044c0| 73 20 6e 6f 6e 2d 6e 69 | 6c 20 69 66 20 73 75 63 |s non-ni|l if suc|
|000044d0| 63 65 73 73 66 75 6c 2e | 22 20 6e 69 6c 5d 29 0a |cessful.|" nil]).|
|000044e0| 28 64 65 66 61 6c 69 61 | 73 20 27 73 68 65 6c 6c |(defalia|s 'shell|
|000044f0| 2d 64 79 6e 61 6d 69 63 | 2d 63 6f 6d 70 6c 65 74 |-dynamic|-complet|
|00004500| 65 2d 61 73 2d 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |e-as-env|ironment|
|00004510| 2d 76 61 72 69 61 62 6c | 65 20 23 5b 6e 69 6c 20 |-variabl|e #[nil |
|00004520| 22 c0 20 86 06 00 c1 89 | 1a c3 c4 5c 6e 5c 22 86 |". .....|...\n\".|
|00004530| 10 00 c5 c6 4f 1e 07 c8 | c9 0e 5c 6e 5c 22 1e 0b |....O...|..\n\"..|
|00004540| 0e 5c 66 1e 0d c6 1e 5c | 66 ce 0e 07 0e 0b 5c 22 |.\f....\|f.....\"|
|00004550| 89 1e 0f d0 3e 83 78 00 | c0 20 89 1a c3 d1 5c 6e |....>.x.|. ....\n|
|00004560| 5c 22 c6 4f 1e 07 c3 d2 | 5c 6e 5c 22 83 47 00 d3 |\".O....|\n\".G..|
|00004570| 82 53 00 c3 d4 5c 6e 5c | 22 83 52 00 d5 82 53 00 |.S...\n\|".R...S.|
|00004580| c1 1e 16 0e 0d 84 5e 00 | c1 82 6e 00 d7 d8 d9 0e |......^.|..n.....|
|00004590| 07 21 21 21 83 6d 00 da | 82 6e 00 db 1e 1c 0e 16 |.!!!.m..|.n......|
|000045a0| 0e 1c b1 02 88 2c 0e 0f | 2e 06 87 22 20 5b 73 68 |.....,..|..." [sh|
|000045b0| 65 6c 6c 2d 6d 61 74 63 | 68 2d 70 61 72 74 69 61 |ell-matc|h-partia|
|000045c0| 6c 2d 76 61 72 69 61 62 | 6c 65 20 22 22 20 76 61 |l-variab|le "" va|
|000045d0| 72 20 73 74 72 69 6e 67 | 2d 6d 61 74 63 68 20 22 |r string|-match "|
|000045e0| 5b 5e 24 28 7b 5d 5c 5c | 7c 24 22 20 30 20 6e 69 |[^$({]\\||$" 0 ni|
|000045f0| 6c 20 76 61 72 69 61 62 | 6c 65 20 6d 61 70 63 61 |l variab|le mapca|
|00004600| 72 20 23 5b 28 78 29 20 | 22 08 c1 c2 c3 08 5c 22 |r #[(x) |".....\"|
|00004610| 4f 87 22 20 5b 78 20 30 | 20 73 74 72 69 6e 67 2d |O." [x 0| string-|
|00004620| 6d 61 74 63 68 20 22 3d | 22 5d 20 35 5d 20 70 72 |match "=|"] 5] pr|
|00004630| 6f 63 65 73 73 2d 65 6e | 76 69 72 6f 6e 6d 65 6e |ocess-en|vironmen|
|00004640| 74 20 76 61 72 69 61 62 | 6c 65 73 20 63 6f 6d 69 |t variab|les comi|
|00004650| 6e 74 2d 63 6f 6d 70 6c | 65 74 69 6f 6e 2d 61 64 |nt-compl|etion-ad|
|00004660| 64 73 75 66 66 69 78 20 | 61 64 64 73 75 66 66 69 |dsuffix |addsuffi|
|00004670| 78 20 63 6f 6d 69 6e 74 | 2d 64 79 6e 61 6d 69 63 |x comint|-dynamic|
|00004680| 2d 73 69 6d 70 6c 65 2d | 63 6f 6d 70 6c 65 74 65 |-simple-|complete|
|00004690| 20 73 75 63 63 65 73 73 | 20 28 73 6f 6c 65 20 73 | success| (sole s|
|000046a0| 68 6f 72 74 65 73 74 29 | 20 22 5b 5e 24 28 7b 5d |hortest)| "[^$({]|
|000046b0| 22 20 22 7b 22 20 22 7d | 22 20 22 28 22 20 22 29 |" "{" "}|" "(" ")|
|000046c0| 22 20 70 72 6f 74 65 63 | 74 69 6f 6e 20 66 69 6c |" protec|tion fil|
|000046d0| 65 2d 64 69 72 65 63 74 | 6f 72 79 2d 70 20 63 6f |e-direct|ory-p co|
|000046e0| 6d 69 6e 74 2d 64 69 72 | 65 63 74 6f 72 79 20 67 |mint-dir|ectory g|
|000046f0| 65 74 65 6e 76 20 22 2f | 22 20 22 20 22 20 73 75 |etenv "/|" " " su|
|00004700| 66 66 69 78 5d 20 35 20 | 22 5c 0a 44 79 6e 61 6d |ffix] 5 |"\.Dynam|
|00004710| 69 63 61 6c 6c 79 20 63 | 6f 6d 70 6c 65 74 65 20 |ically c|omplete |
|00004720| 61 74 20 70 6f 69 6e 74 | 20 61 73 20 61 6e 20 65 |at point| as an e|
|00004730| 6e 76 69 72 6f 6e 6d 65 | 6e 74 20 76 61 72 69 61 |nvironme|nt varia|
|00004740| 62 6c 65 2e 0a 55 73 65 | 64 20 62 79 20 60 73 68 |ble..Use|d by `sh|
|00004750| 65 6c 6c 2d 64 79 6e 61 | 6d 69 63 2d 63 6f 6d 70 |ell-dyna|mic-comp|
|00004760| 6c 65 74 65 2d 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |lete-env|ironment|
|00004770| 2d 76 61 72 69 61 62 6c | 65 27 2e 0a 55 73 65 73 |-variabl|e'..Uses|
|00004780| 20 60 63 6f 6d 69 6e 74 | 2d 64 79 6e 61 6d 69 63 | `comint|-dynamic|
|00004790| 2d 73 69 6d 70 6c 65 2d | 63 6f 6d 70 6c 65 74 65 |-simple-|complete|
|000047a0| 27 2e 22 5d 29 0a 28 64 | 65 66 61 6c 69 61 73 20 |'."]).(d|efalias |
|000047b0| 27 73 68 65 6c 6c 2d 72 | 65 70 6c 61 63 65 2d 62 |'shell-r|eplace-b|
|000047c0| 79 2d 65 78 70 61 6e 64 | 65 64 2d 64 69 72 65 63 |y-expand|ed-direc|
|000047d0| 74 6f 72 79 20 23 5b 6e | 69 6c 20 22 c0 20 85 55 |tory #[n|il ". .U|
|000047e0| 00 8a c1 94 62 88 5c 6e | 0b 42 c4 c5 21 83 18 00 |....b.\n|.B..!...|
|000047f0| 0b 47 82 25 00 c4 c6 21 | 85 25 00 c7 c8 94 c8 95 |.G.%...!|.%......|
|00004800| 7b 21 1e 09 1e 5c 6e 0e | 09 84 32 00 cb 82 54 00 |{!...\n.|..2...T.|
|00004810| 0e 09 0e 5c 6e 47 59 83 | 41 00 cc cd 21 82 54 00 |...\nGY.|A...!.T.|
|00004820| ce cf 0e 09 0e 5c 6e 38 | 21 d0 89 23 88 d1 d2 0e |.....\n8|!..#....|
|00004830| 09 5c 22 88 d0 2b 87 22 | 20 5b 63 6f 6d 69 6e 74 |.\"..+."| [comint|
|00004840| 2d 6d 61 74 63 68 2d 70 | 61 72 74 69 61 6c 2d 66 |-match-p|artial-f|
|00004850| 69 6c 65 6e 61 6d 65 20 | 30 20 64 65 66 61 75 6c |ilename |0 defaul|
|00004860| 74 2d 64 69 72 65 63 74 | 6f 72 79 20 73 68 65 6c |t-direct|ory shel|
|00004870| 6c 2d 64 69 72 73 74 61 | 63 6b 20 6c 6f 6f 6b 69 |l-dirsta|ck looki|
|00004880| 6e 67 2d 61 74 20 22 3d | 2d 2f 3f 22 20 22 3d 5c |ng-at "=|-/?" "=\|
|00004890| 5c 28 5b 30 2d 39 5d 2b | 5c 5c 29 22 20 73 74 72 |\([0-9]+|\\)" str|
|000048a0| 69 6e 67 2d 74 6f 2d 6e | 75 6d 62 65 72 20 31 20 |ing-to-n|umber 1 |
|000048b0| 69 6e 64 65 78 20 73 74 | 61 63 6b 20 6e 69 6c 20 |index st|ack nil |
|000048c0| 65 72 72 6f 72 20 22 44 | 69 72 65 63 74 6f 72 79 |error "D|irectory|
|000048d0| 20 73 74 61 63 6b 20 6e | 6f 74 20 74 68 61 74 20 | stack n|ot that |
|000048e0| 64 65 65 70 2e 22 20 72 | 65 70 6c 61 63 65 2d 6d |deep." r|eplace-m|
|000048f0| 61 74 63 68 20 66 69 6c | 65 2d 6e 61 6d 65 2d 61 |atch fil|e-name-a|
|00004900| 73 2d 64 69 72 65 63 74 | 6f 72 79 20 74 20 6d 65 |s-direct|ory t me|
|00004910| 73 73 61 67 65 20 22 44 | 69 72 65 63 74 6f 72 79 |ssage "D|irectory|
|00004920| 20 69 74 65 6d 3a 20 25 | 64 22 5d 20 34 20 22 5c | item: %|d"] 4 "\|
|00004930| 0a 45 78 70 61 6e 64 20 | 64 69 72 65 63 74 6f 72 |.Expand |director|
|00004940| 79 20 73 74 61 63 6b 20 | 72 65 66 65 72 65 6e 63 |y stack |referenc|
|00004950| 65 20 62 65 66 6f 72 65 | 20 70 6f 69 6e 74 2e 0a |e before| point..|
|00004960| 44 69 72 65 63 74 6f 72 | 79 20 73 74 61 63 6b 20 |Director|y stack |
|00004970| 72 65 66 65 72 65 6e 63 | 65 73 20 61 72 65 20 6f |referenc|es are o|
|00004980| 66 20 74 68 65 20 66 6f | 72 6d 20 5c 22 3d 64 69 |f the fo|rm \"=di|
|00004990| 67 69 74 5c 22 20 6f 72 | 20 5c 22 3d 2d 5c 22 2e |git\" or| \"=-\".|
|000049a0| 0a 53 65 65 20 60 64 65 | 66 61 75 6c 74 2d 64 69 |.See `de|fault-di|
|000049b0| 72 65 63 74 6f 72 79 27 | 20 61 6e 64 20 60 73 68 |rectory'| and `sh|
|000049c0| 65 6c 6c 2d 64 69 72 73 | 74 61 63 6b 27 2e 0a 0a |ell-dirs|tack'...|
|000049d0| 52 65 74 75 72 6e 73 20 | 74 20 69 66 20 73 75 63 |Returns |t if suc|
|000049e0| 63 65 73 73 66 75 6c 2e | 22 20 6e 69 6c 5d 29 0a |cessful.|" nil]).|
|000049f0| 28 64 65 66 61 6c 69 61 | 73 20 27 73 68 65 6c 6c |(defalia|s 'shell|
|00004a00| 2d 73 74 72 69 70 2d 63 | 74 72 6c 2d 6d 20 23 5b |-strip-c|trl-m #[|
|00004a10| 28 26 6f 70 74 69 6f 6e | 61 6c 20 73 74 72 69 6e |(&option|al strin|
|00004a20| 67 29 20 22 c0 c1 70 21 | 21 1a 8a 74 83 0f 00 0b |g) "..p!|!..t....|
|00004a30| 82 10 00 5c 66 62 88 c5 | c6 5c 6e c7 23 85 23 00 |...\fb..|.\n.#.#.|
|00004a40| c8 c9 c7 89 23 88 82 12 | 00 2a 87 22 20 5b 70 72 |....#...|.*." [pr|
|00004a50| 6f 63 65 73 73 2d 6d 61 | 72 6b 20 67 65 74 2d 62 |ocess-ma|rk get-b|
|00004a60| 75 66 66 65 72 2d 70 72 | 6f 63 65 73 73 20 70 6d |uffer-pr|ocess pm|
|00004a70| 61 72 6b 20 63 6f 6d 69 | 6e 74 2d 6c 61 73 74 2d |ark comi|nt-last-|
|00004a80| 69 6e 70 75 74 2d 65 6e | 64 20 63 6f 6d 69 6e 74 |input-en|d comint|
|00004a90| 2d 6c 61 73 74 2d 6f 75 | 74 70 75 74 2d 73 74 61 |-last-ou|tput-sta|
|00004aa0| 72 74 20 72 65 2d 73 65 | 61 72 63 68 2d 66 6f 72 |rt re-se|arch-for|
|00004ab0| 77 61 72 64 20 22 0d 2b | 24 22 20 74 20 72 65 70 |ward ".+|$" t rep|
|00004ac0| 6c 61 63 65 2d 6d 61 74 | 63 68 20 22 22 5d 20 34 |lace-mat|ch ""] 4|
|00004ad0| 20 22 5c 0a 53 74 72 69 | 70 20 74 72 61 69 6c 69 | "\.Stri|p traili|
|00004ae0| 6e 67 20 60 5e 4d 27 20 | 63 68 61 72 61 63 74 65 |ng `^M' |characte|
|00004af0| 72 73 20 66 72 6f 6d 20 | 74 68 65 20 63 75 72 72 |rs from |the curr|
|00004b00| 65 6e 74 20 6f 75 74 70 | 75 74 20 67 72 6f 75 70 |ent outp|ut group|
|00004b10| 2e 0a 0a 54 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |...This |function|
|00004b20| 20 63 6f 75 6c 64 20 62 | 65 20 69 6e 20 74 68 65 | could b|e in the|
|00004b30| 20 6c 69 73 74 20 60 63 | 6f 6d 69 6e 74 2d 6f 75 | list `c|omint-ou|
|00004b40| 74 70 75 74 2d 66 69 6c | 74 65 72 2d 66 75 6e 63 |tput-fil|ter-func|
|00004b50| 74 69 6f 6e 73 27 20 6f | 72 20 62 6f 75 6e 64 20 |tions' o|r bound |
|00004b60| 74 6f 0a 61 20 6b 65 79 | 2e 22 20 6e 69 6c 5d 29 |to.a key|." nil])|
|00004b70| 0a 28 70 72 6f 76 69 64 | 65 20 28 71 75 6f 74 65 |.(provid|e (quote|
|00004b80| 20 73 68 65 6c 6c 29 29 | 0a | shell))|. |
+--------+-------------------------+-------------------------+--------+--------+