home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / emacs-19.16 / lisp / shell.elc < prev    next >
Emacs Compiled Lisp  |  1993-07-05  |  9.0 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
1% dexvert Combustion 2 Particle Library (other/combustion2ParticleLibrary) ext Unsupported
100% file Emacs/XEmacs v19 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default
100% xdgMime text/x-emacs-lisp default (weak)



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 6a 69 6d 62 40 67 65 |piled by| jimb@ge|
|00000020| 65 63 68 2e 67 6e 75 2e | 61 69 2e 6d 69 74 2e 65 |ech.gnu.|ai.mit.e|
|00000030| 64 75 20 6f 6e 20 4d 6f | 6e 20 4a 75 6c 20 20 35 |du on Mo|n Jul 5|
|00000040| 20 32 33 3a 35 39 3a 32 | 38 20 31 39 39 33 0a 3b | 23:59:2|8 1993.;|
|00000050| 3b 3b 20 66 72 6f 6d 20 | 66 69 6c 65 20 2f 67 64 |;; from |file /gd|
|00000060| 2f 67 6e 75 2f 65 6d 61 | 63 73 2f 31 39 2e 30 2f |/gnu/ema|cs/19.0/|
|00000070| 6c 69 73 70 2f 73 68 65 | 6c 6c 2e 65 6c 0a 3b 3b |lisp/she|ll.el.;;|
|00000080| 3b 20 65 6d 61 63 73 20 | 76 65 72 73 69 6f 6e 20 |; emacs |version |
|00000090| 31 39 2e 31 35 2e 31 36 | 2e 0a 3b 3b 3b 20 62 79 |19.15.16|..;;; by|
|000000a0| 74 65 63 6f 6d 70 20 76 | 65 72 73 69 6f 6e 20 46 |tecomp v|ersion F|
|000000b0| 53 46 20 32 2e 31 30 0a | 3b 3b 3b 20 6f 70 74 69 |SF 2.10.|;;; opti|
|000000c0| 6d 69 7a 61 74 69 6f 6e | 20 69 73 20 6f 6e 2e 0a |mization| is on..|
|000000d0| 3b 3b 3b 20 74 68 69 73 | 20 66 69 6c 65 20 75 73 |;;; this| file us|
|000000e0| 65 73 20 6f 70 63 6f 64 | 65 73 20 77 68 69 63 68 |es opcod|es which|
|000000f0| 20 64 6f 20 6e 6f 74 20 | 65 78 69 73 74 20 69 6e | do not |exist in|
|00000100| 20 45 6d 61 63 73 20 31 | 38 2e 0a 0a 28 69 66 20 | Emacs 1|8...(if |
|00000110| 28 61 6e 64 20 28 62 6f | 75 6e 64 70 20 27 65 6d |(and (bo|undp 'em|
|00000120| 61 63 73 2d 76 65 72 73 | 69 6f 6e 29 0a 09 20 28 |acs-vers|ion).. (|
|00000130| 6f 72 20 28 61 6e 64 20 | 28 62 6f 75 6e 64 70 20 |or (and |(boundp |
|00000140| 27 65 70 6f 63 68 3a 3a | 76 65 72 73 69 6f 6e 29 |'epoch::|version)|
|00000150| 20 65 70 6f 63 68 3a 3a | 76 65 72 73 69 6f 6e 29 | epoch::|version)|
|00000160| 0a 09 20 20 20 20 20 28 | 73 74 72 69 6e 67 2d 6c |.. (|string-l|
|00000170| 65 73 73 70 20 65 6d 61 | 63 73 2d 76 65 72 73 69 |essp ema|cs-versi|
|00000180| 6f 6e 20 22 31 39 22 29 | 29 29 0a 20 20 20 20 28 |on "19")|)). (|
|00000190| 65 72 72 6f 72 20 22 54 | 68 69 73 20 66 69 6c 65 |error "T|his file|
|000001a0| 20 77 61 73 20 63 6f 6d | 70 69 6c 65 64 20 66 6f | was com|piled fo|
|000001b0| 72 20 45 6d 61 63 73 20 | 31 39 22 29 29 0a 0a 28 |r Emacs |19"))..(|
|000001c0| 72 65 71 75 69 72 65 20 | 28 71 75 6f 74 65 20 63 |require |(quote c|
|000001d0| 6f 6d 69 6e 74 29 29 0a | 28 64 65 66 76 61 72 20 |omint)).|(defvar |
|000001e0| 73 68 65 6c 6c 2d 70 72 | 6f 6d 70 74 2d 70 61 74 |shell-pr|ompt-pat|
|000001f0| 74 65 72 6e 20 22 5e 5b | 5e 23 24 25 3e 5d 2a 5b |tern "^[|^#$%>]*[|
|00000200| 23 24 25 3e 5d 20 2a 22 | 20 22 5c 0a 52 65 67 65 |#$%>] *"| "\.Rege|
|00000210| 78 70 20 74 6f 20 6d 61 | 74 63 68 20 70 72 6f 6d |xp to ma|tch prom|
|00000220| 70 74 73 20 69 6e 20 74 | 68 65 20 69 6e 66 65 72 |pts in t|he infer|
|00000230| 69 6f 72 20 73 68 65 6c | 6c 2e 0a 44 65 66 61 75 |ior shel|l..Defau|
|00000240| 6c 74 73 20 74 6f 20 5c | 22 5e 5b 5e 23 24 25 3e |lts to \|"^[^#$%>|
|00000250| 5d 2a 5b 23 24 25 3e 5d | 20 2a 5c 22 2c 20 77 68 |]*[#$%>]| *\", wh|
|00000260| 69 63 68 20 77 6f 72 6b | 73 20 70 72 65 74 74 79 |ich work|s pretty|
|00000270| 20 77 65 6c 6c 2e 0a 54 | 68 69 73 20 76 61 72 69 | well..T|his vari|
|00000280| 61 62 6c 65 20 69 73 20 | 75 73 65 64 20 74 6f 20 |able is |used to |
|00000290| 69 6e 69 74 69 61 6c 69 | 73 65 20 60 63 6f 6d 69 |initiali|se `comi|
|000002a0| 6e 74 2d 70 72 6f 6d 70 | 74 2d 72 65 67 65 78 70 |nt-promp|t-regexp|
|000002b0| 27 20 69 6e 20 74 68 65 | 20 0a 73 68 65 6c 6c 20 |' in the| .shell |
|000002c0| 62 75 66 66 65 72 2e 0a | 0a 54 68 69 73 20 69 73 |buffer..|.This is|
|000002d0| 20 61 20 66 69 6e 65 20 | 74 68 69 6e 67 20 74 6f | a fine |thing to|
|000002e0| 20 73 65 74 20 69 6e 20 | 79 6f 75 72 20 60 2e 65 | set in |your `.e|
|000002f0| 6d 61 63 73 27 20 66 69 | 6c 65 2e 22 29 0a 28 64 |macs' fi|le.").(d|
|00000300| 65 66 76 61 72 20 73 68 | 65 6c 6c 2d 70 6f 70 64 |efvar sh|ell-popd|
|00000310| 2d 72 65 67 65 78 70 20 | 22 70 6f 70 64 22 20 22 |-regexp |"popd" "|
|00000320| 5c 0a 2a 52 65 67 65 78 | 70 20 74 6f 20 6d 61 74 |\.*Regex|p to mat|
|00000330| 63 68 20 73 75 62 73 68 | 65 6c 6c 20 63 6f 6d 6d |ch subsh|ell comm|
|00000340| 61 6e 64 73 20 65 71 75 | 69 76 61 6c 65 6e 74 20 |ands equ|ivalent |
|00000350| 74 6f 20 70 6f 70 64 2e | 22 29 0a 28 64 65 66 76 |to popd.|").(defv|
|00000360| 61 72 20 73 68 65 6c 6c | 2d 70 75 73 68 64 2d 72 |ar shell|-pushd-r|
|00000370| 65 67 65 78 70 20 22 70 | 75 73 68 64 22 20 22 5c |egexp "p|ushd" "\|
|00000380| 0a 2a 52 65 67 65 78 70 | 20 74 6f 20 6d 61 74 63 |.*Regexp| to matc|
|00000390| 68 20 73 75 62 73 68 65 | 6c 6c 20 63 6f 6d 6d 61 |h subshe|ll comma|
|000003a0| 6e 64 73 20 65 71 75 69 | 76 61 6c 65 6e 74 20 74 |nds equi|valent t|
|000003b0| 6f 20 70 75 73 68 64 2e | 22 29 0a 28 64 65 66 76 |o pushd.|").(defv|
|000003c0| 61 72 20 73 68 65 6c 6c | 2d 63 64 2d 72 65 67 65 |ar shell|-cd-rege|
|000003d0| 78 70 20 22 63 64 22 20 | 22 5c 0a 2a 52 65 67 65 |xp "cd" |"\.*Rege|
|000003e0| 78 70 20 74 6f 20 6d 61 | 74 63 68 20 73 75 62 73 |xp to ma|tch subs|
|000003f0| 68 65 6c 6c 20 63 6f 6d | 6d 61 6e 64 73 20 65 71 |hell com|mands eq|
|00000400| 75 69 76 61 6c 65 6e 74 | 20 74 6f 20 63 64 2e 22 |uivalent| to cd."|
|00000410| 29 0a 28 64 65 66 76 61 | 72 20 65 78 70 6c 69 63 |).(defva|r explic|
|00000420| 69 74 2d 73 68 65 6c 6c | 2d 66 69 6c 65 2d 6e 61 |it-shell|-file-na|
|00000430| 6d 65 20 6e 69 6c 20 22 | 5c 0a 2a 49 66 20 6e 6f |me nil "|\.*If no|
|00000440| 6e 2d 6e 69 6c 2c 20 69 | 73 20 66 69 6c 65 20 6e |n-nil, i|s file n|
|00000450| 61 6d 65 20 74 6f 20 75 | 73 65 20 66 6f 72 20 65 |ame to u|se for e|
|00000460| 78 70 6c 69 63 69 74 6c | 79 20 72 65 71 75 65 73 |xplicitl|y reques|
|00000470| 74 65 64 20 69 6e 66 65 | 72 69 6f 72 20 73 68 65 |ted infe|rior she|
|00000480| 6c 6c 2e 22 29 0a 28 64 | 65 66 76 61 72 20 65 78 |ll.").(d|efvar ex|
|00000490| 70 6c 69 63 69 74 2d 63 | 73 68 2d 61 72 67 73 20 |plicit-c|sh-args |
|000004a0| 28 62 79 74 65 2d 63 6f | 64 65 20 22 08 c1 3d 83 |(byte-co|de "..=.|
|000004b0| 08 00 c2 87 c3 87 22 20 | 5b 73 79 73 74 65 6d 2d |......" |[system-|
|000004c0| 74 79 70 65 20 68 70 75 | 78 20 28 22 2d 69 22 20 |type hpu|x ("-i" |
|000004d0| 22 2d 54 22 29 20 28 22 | 2d 69 22 29 5d 20 32 29 |"-T") ("|-i")] 2)|
|000004e0| 20 22 5c 0a 2a 41 72 67 | 73 20 70 61 73 73 65 64 | "\.*Arg|s passed|
|000004f0| 20 74 6f 20 69 6e 66 65 | 72 69 6f 72 20 73 68 65 | to infe|rior she|
|00000500| 6c 6c 20 62 79 20 4d 2d | 78 20 73 68 65 6c 6c 2c |ll by M-|x shell,|
|00000510| 20 69 66 20 74 68 65 20 | 73 68 65 6c 6c 20 69 73 | if the |shell is|
|00000520| 20 63 73 68 2e 0a 56 61 | 6c 75 65 20 69 73 20 61 | csh..Va|lue is a|
|00000530| 20 6c 69 73 74 20 6f 66 | 20 73 74 72 69 6e 67 73 | list of| strings|
|00000540| 2c 20 77 68 69 63 68 20 | 6d 61 79 20 62 65 20 6e |, which |may be n|
|00000550| 69 6c 2e 22 29 0a 28 64 | 65 66 76 61 72 20 73 68 |il.").(d|efvar sh|
|00000560| 65 6c 6c 2d 64 69 72 73 | 74 61 63 6b 20 6e 69 6c |ell-dirs|tack nil|
|00000570| 20 22 5c 0a 4c 69 73 74 | 20 6f 66 20 64 69 72 65 | "\.List| of dire|
|00000580| 63 74 6f 72 69 65 73 20 | 73 61 76 65 64 20 62 79 |ctories |saved by|
|00000590| 20 70 75 73 68 64 20 69 | 6e 20 74 68 69 73 20 62 | pushd i|n this b|
|000005a0| 75 66 66 65 72 27 73 20 | 73 68 65 6c 6c 2e 0a 54 |uffer's |shell..T|
|000005b0| 68 75 73 2c 20 74 68 69 | 73 20 64 6f 65 73 20 6e |hus, thi|s does n|
|000005c0| 6f 74 20 69 6e 63 6c 75 | 64 65 20 74 68 65 20 73 |ot inclu|de the s|
|000005d0| 68 65 6c 6c 27 73 20 63 | 75 72 72 65 6e 74 20 64 |hell's c|urrent d|
|000005e0| 69 72 65 63 74 6f 72 79 | 2e 22 29 0a 28 64 65 66 |irectory|.").(def|
|000005f0| 76 61 72 20 73 68 65 6c | 6c 2d 6c 61 73 74 2d 64 |var shel|l-last-d|
|00000600| 69 72 20 6e 69 6c 20 22 | 5c 0a 4b 65 65 70 20 74 |ir nil "|\.Keep t|
|00000610| 72 61 63 6b 20 6f 66 20 | 6c 61 73 74 20 64 69 72 |rack of |last dir|
|00000620| 65 63 74 6f 72 79 20 66 | 6f 72 20 6b 73 68 20 60 |ectory f|or ksh `|
|00000630| 63 64 20 2d 27 20 63 6f | 6d 6d 61 6e 64 2e 22 29 |cd -' co|mmand.")|
|00000640| 0a 28 64 65 66 76 61 72 | 20 73 68 65 6c 6c 2d 64 |.(defvar| shell-d|
|00000650| 69 72 73 74 61 63 6b 2d | 71 75 65 72 79 20 22 64 |irstack-|query "d|
|00000660| 69 72 73 22 20 22 5c 0a | 43 6f 6d 6d 61 6e 64 20 |irs" "\.|Command |
|00000670| 75 73 65 64 20 62 79 20 | 60 73 68 65 6c 6c 2d 72 |used by |`shell-r|
|00000680| 65 73 79 6e 63 2d 64 69 | 72 27 20 74 6f 20 71 75 |esync-di|r' to qu|
|00000690| 65 72 79 20 74 68 65 20 | 73 68 65 6c 6c 2e 22 29 |ery the |shell.")|
|000006a0| 0a 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c0 c1 21 |.(byte-c|ode "..!|
|000006b0| 84 08 00 c2 11 09 84 1c | 00 c3 0c 21 11 c5 09 c6 |........|...!....|
|000006c0| c7 23 88 c5 09 c8 c9 23 | 88 c2 87 22 20 5b 62 6f |.#.....#|..." [bo|
|000006d0| 75 6e 64 70 20 73 68 65 | 6c 6c 2d 6d 6f 64 65 2d |undp she|ll-mode-|
|000006e0| 6d 61 70 20 6e 69 6c 20 | 66 75 6c 6c 2d 63 6f 70 |map nil |full-cop|
|000006f0| 79 2d 73 70 61 72 73 65 | 2d 6b 65 79 6d 61 70 20 |y-sparse|-keymap |
|00000700| 63 6f 6d 69 6e 74 2d 6d | 6f 64 65 2d 6d 61 70 20 |comint-m|ode-map |
|00000710| 64 65 66 69 6e 65 2d 6b | 65 79 20 22 09 22 20 63 |define-k|ey "." c|
|00000720| 6f 6d 69 6e 74 2d 64 79 | 6e 61 6d 69 63 2d 63 6f |omint-dy|namic-co|
|00000730| 6d 70 6c 65 74 65 20 22 | bf 22 20 63 6f 6d 69 6e |mplete "|." comin|
|00000740| 74 2d 64 79 6e 61 6d 69 | 63 2d 6c 69 73 74 2d 63 |t-dynami|c-list-c|
|00000750| 6f 6d 70 6c 65 74 69 6f | 6e 73 5d 20 34 29 0a 28 |ompletio|ns] 4).(|
|00000760| 64 65 66 76 61 72 20 73 | 68 65 6c 6c 2d 6d 6f 64 |defvar s|hell-mod|
|00000770| 65 2d 68 6f 6f 6b 20 6e | 69 6c 20 22 5c 0a 2a 48 |e-hook n|il "\.*H|
|00000780| 6f 6f 6b 20 66 6f 72 20 | 63 75 73 74 6f 6d 69 73 |ook for |customis|
|00000790| 69 6e 67 20 53 68 65 6c | 6c 20 6d 6f 64 65 2e 22 |ing Shel|l mode."|
|000007a0| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 73 68 65 |).(defal|ias 'she|
|000007b0| 6c 6c 2d 6d 6f 64 65 20 | 23 5b 6e 69 6c 20 22 c0 |ll-mode |#[nil ".|
|000007c0| 20 88 09 12 c3 14 c5 16 | 06 c7 0e 08 21 88 c9 ca | .......|....!...|
|000007d0| 21 88 cb 16 5c 6e cb 16 | 0c c9 cd 21 88 ce 16 0d |!...\n..|...!....|
|000007e0| cf 16 10 d1 d2 21 87 22 | 20 5b 63 6f 6d 69 6e 74 |.....!."| [comint|
|000007f0| 2d 6d 6f 64 65 20 73 68 | 65 6c 6c 2d 70 72 6f 6d |-mode sh|ell-prom|
|00000800| 70 74 2d 70 61 74 74 65 | 72 6e 20 63 6f 6d 69 6e |pt-patte|rn comin|
|00000810| 74 2d 70 72 6f 6d 70 74 | 2d 72 65 67 65 78 70 20 |t-prompt|-regexp |
|00000820| 73 68 65 6c 6c 2d 6d 6f | 64 65 20 6d 61 6a 6f 72 |shell-mo|de major|
|00000830| 2d 6d 6f 64 65 20 22 53 | 68 65 6c 6c 22 20 6d 6f |-mode "S|hell" mo|
|00000840| 64 65 2d 6e 61 6d 65 20 | 75 73 65 2d 6c 6f 63 61 |de-name |use-loca|
|00000850| 6c 2d 6d 61 70 20 73 68 | 65 6c 6c 2d 6d 6f 64 65 |l-map sh|ell-mode|
|00000860| 2d 6d 61 70 20 6d 61 6b | 65 2d 6c 6f 63 61 6c 2d |-map mak|e-local-|
|00000870| 76 61 72 69 61 62 6c 65 | 20 73 68 65 6c 6c 2d 64 |variable| shell-d|
|00000880| 69 72 73 74 61 63 6b 20 | 6e 69 6c 20 73 68 65 6c |irstack |nil shel|
|00000890| 6c 2d 6c 61 73 74 2d 64 | 69 72 20 73 68 65 6c 6c |l-last-d|ir shell|
|000008a0| 2d 64 69 72 74 72 61 63 | 6b 70 20 74 20 73 68 65 |-dirtrac|kp t she|
|000008b0| 6c 6c 2d 64 69 72 65 63 | 74 6f 72 79 2d 74 72 61 |ll-direc|tory-tra|
|000008c0| 63 6b 65 72 20 63 6f 6d | 69 6e 74 2d 69 6e 70 75 |cker com|int-inpu|
|000008d0| 74 2d 73 65 6e 74 69 6e | 65 6c 20 72 75 6e 2d 68 |t-sentin|el run-h|
|000008e0| 6f 6f 6b 73 20 73 68 65 | 6c 6c 2d 6d 6f 64 65 2d |ooks she|ll-mode-|
|000008f0| 68 6f 6f 6b 5d 20 32 20 | 22 5c 0a 4d 61 6a 6f 72 |hook] 2 |"\.Major|
|00000900| 20 6d 6f 64 65 20 66 6f | 72 20 69 6e 74 65 72 61 | mode fo|r intera|
|00000910| 63 74 69 6e 67 20 77 69 | 74 68 20 61 6e 20 69 6e |cting wi|th an in|
|00000920| 66 65 72 69 6f 72 20 73 | 68 65 6c 6c 2e 0a 52 65 |ferior s|hell..Re|
|00000930| 74 75 72 6e 20 61 66 74 | 65 72 20 74 68 65 20 65 |turn aft|er the e|
|00000940| 6e 64 20 6f 66 20 74 68 | 65 20 70 72 6f 63 65 73 |nd of th|e proces|
|00000950| 73 27 20 6f 75 74 70 75 | 74 20 73 65 6e 64 73 20 |s' outpu|t sends |
|00000960| 74 68 65 20 74 65 78 74 | 20 66 72 6f 6d 20 74 68 |the text| from th|
|00000970| 65 20 0a 20 20 20 20 65 | 6e 64 20 6f 66 20 70 72 |e . e|nd of pr|
|00000980| 6f 63 65 73 73 20 74 6f | 20 74 68 65 20 65 6e 64 |ocess to| the end|
|00000990| 20 6f 66 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | of the |current |
|000009a0| 6c 69 6e 65 2e 0a 52 65 | 74 75 72 6e 20 62 65 66 |line..Re|turn bef|
|000009b0| 6f 72 65 20 65 6e 64 20 | 6f 66 20 70 72 6f 63 65 |ore end |of proce|
|000009c0| 73 73 20 6f 75 74 70 75 | 74 20 63 6f 70 69 65 73 |ss outpu|t copies|
|000009d0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 6c 69 6e | the cur|rent lin|
|000009e0| 65 20 28 65 78 63 65 70 | 74 0a 20 20 20 20 66 6f |e (excep|t. fo|
|000009f0| 72 20 74 68 65 20 70 72 | 6f 6d 70 74 29 20 74 6f |r the pr|ompt) to|
|00000a00| 20 74 68 65 20 65 6e 64 | 20 6f 66 20 74 68 65 20 | the end| of the |
|00000a10| 62 75 66 66 65 72 20 61 | 6e 64 20 73 65 6e 64 73 |buffer a|nd sends|
|00000a20| 20 69 74 2e 0a 4d 2d 78 | 20 73 65 6e 64 2d 69 6e | it..M-x| send-in|
|00000a30| 76 69 73 69 62 6c 65 20 | 72 65 61 64 73 20 61 20 |visible |reads a |
|00000a40| 6c 69 6e 65 20 6f 66 20 | 74 65 78 74 20 77 69 74 |line of |text wit|
|00000a50| 68 6f 75 74 20 65 63 68 | 6f 69 6e 67 20 69 74 2c |hout ech|oing it,|
|00000a60| 20 61 6e 64 20 73 65 6e | 64 73 20 69 74 20 74 6f | and sen|ds it to|
|00000a70| 0a 20 20 20 20 74 68 65 | 20 73 68 65 6c 6c 2e 20 |. the| shell. |
|00000a80| 20 54 68 69 73 20 69 73 | 20 75 73 65 66 75 6c 20 | This is| useful |
|00000a90| 66 6f 72 20 65 6e 74 65 | 72 69 6e 67 20 70 61 73 |for ente|ring pas|
|00000aa0| 73 77 6f 72 64 73 2e 0a | 0a 49 66 20 79 6f 75 20 |swords..|.If you |
|00000ab0| 61 63 63 69 64 65 6e 74 | 61 6c 6c 79 20 73 75 73 |accident|ally sus|
|00000ac0| 70 65 6e 64 20 79 6f 75 | 72 20 70 72 6f 63 65 73 |pend you|r proces|
|00000ad0| 73 2c 20 75 73 65 20 5c | 5c 5b 63 6f 6d 69 6e 74 |s, use \|\[comint|
|00000ae0| 2d 63 6f 6e 74 69 6e 75 | 65 2d 73 75 62 6a 6f 62 |-continu|e-subjob|
|00000af0| 5d 0a 74 6f 20 63 6f 6e | 74 69 6e 75 65 20 69 74 |].to con|tinue it|
|00000b00| 2e 0a 0a 63 64 2c 20 70 | 75 73 68 64 20 61 6e 64 |...cd, p|ushd and|
|00000b10| 20 70 6f 70 64 20 63 6f | 6d 6d 61 6e 64 73 20 67 | popd co|mmands g|
|00000b20| 69 76 65 6e 20 74 6f 20 | 74 68 65 20 73 68 65 6c |iven to |the shel|
|00000b30| 6c 20 61 72 65 20 77 61 | 74 63 68 65 64 20 62 79 |l are wa|tched by|
|00000b40| 20 45 6d 61 63 73 20 74 | 6f 20 6b 65 65 70 0a 74 | Emacs t|o keep.t|
|00000b50| 68 69 73 20 62 75 66 66 | 65 72 27 73 20 64 65 66 |his buff|er's def|
|00000b60| 61 75 6c 74 20 64 69 72 | 65 63 74 6f 72 79 20 74 |ault dir|ectory t|
|00000b70| 68 65 20 73 61 6d 65 20 | 61 73 20 74 68 65 20 73 |he same |as the s|
|00000b80| 68 65 6c 6c 27 73 20 77 | 6f 72 6b 69 6e 67 20 64 |hell's w|orking d|
|00000b90| 69 72 65 63 74 6f 72 79 | 2e 0a 4d 2d 78 20 64 69 |irectory|..M-x di|
|00000ba0| 72 73 20 71 75 65 72 69 | 65 73 20 74 68 65 20 73 |rs queri|es the s|
|00000bb0| 68 65 6c 6c 20 61 6e 64 | 20 72 65 73 79 6e 63 73 |hell and| resyncs|
|00000bc0| 20 45 6d 61 63 73 27 20 | 69 64 65 61 20 6f 66 20 | Emacs' |idea of |
|00000bd0| 77 68 61 74 20 74 68 65 | 20 63 75 72 72 65 6e 74 |what the| current|
|00000be0| 20 0a 20 20 20 20 64 69 | 72 65 63 74 6f 72 79 20 | . di|rectory |
|00000bf0| 73 74 61 63 6b 20 69 73 | 2e 0a 4d 2d 78 20 64 69 |stack is|..M-x di|
|00000c00| 72 74 72 61 63 6b 2d 74 | 6f 67 67 6c 65 20 74 75 |rtrack-t|oggle tu|
|00000c10| 72 6e 73 20 64 69 72 65 | 63 74 6f 72 79 20 74 72 |rns dire|ctory tr|
|00000c20| 61 63 6b 69 6e 67 20 6f | 6e 20 61 6e 64 20 6f 66 |acking o|n and of|
|00000c30| 66 2e 0a 0a 5c 5c 7b 73 | 68 65 6c 6c 2d 6d 6f 64 |f...\\{s|hell-mod|
|00000c40| 65 2d 6d 61 70 7d 0a 43 | 75 73 74 6f 6d 69 7a 61 |e-map}.C|ustomiza|
|00000c50| 74 69 6f 6e 3a 20 45 6e | 74 72 79 20 74 6f 20 74 |tion: En|try to t|
|00000c60| 68 69 73 20 6d 6f 64 65 | 20 72 75 6e 73 20 74 68 |his mode| runs th|
|00000c70| 65 20 68 6f 6f 6b 73 20 | 6f 6e 20 60 63 6f 6d 69 |e hooks |on `comi|
|00000c80| 6e 74 2d 6d 6f 64 65 2d | 68 6f 6f 6b 27 20 61 6e |nt-mode-|hook' an|
|00000c90| 64 0a 60 73 68 65 6c 6c | 2d 6d 6f 64 65 2d 68 6f |d.`shell|-mode-ho|
|00000ca0| 6f 6b 27 20 28 69 6e 20 | 74 68 61 74 20 6f 72 64 |ok' (in |that ord|
|00000cb0| 65 72 29 2e 0a 0a 56 61 | 72 69 61 62 6c 65 73 20 |er)...Va|riables |
|00000cc0| 60 73 68 65 6c 6c 2d 63 | 64 2d 72 65 67 65 78 70 |`shell-c|d-regexp|
|00000cd0| 27 2c 20 60 73 68 65 6c | 6c 2d 70 75 73 68 64 2d |', `shel|l-pushd-|
|00000ce0| 72 65 67 65 78 70 27 20 | 61 6e 64 20 60 73 68 65 |regexp' |and `she|
|00000cf0| 6c 6c 2d 70 6f 70 64 2d | 72 65 67 65 78 70 27 0a |ll-popd-|regexp'.|
|00000d00| 61 72 65 20 75 73 65 64 | 20 74 6f 20 6d 61 74 63 |are used| to matc|
|00000d10| 68 20 74 68 65 69 72 20 | 72 65 73 70 65 63 74 69 |h their |respecti|
|00000d20| 76 65 20 63 6f 6d 6d 61 | 6e 64 73 2e 22 20 6e 69 |ve comma|nds." ni|
|00000d30| 6c 5d 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 73 |l]).(def|alias 's|
|00000d40| 68 65 6c 6c 20 23 5b 6e | 69 6c 20 22 c0 c1 21 84 |hell #[n|il "..!.|
|00000d50| 56 00 5c 6e 86 17 00 c3 | c4 21 86 17 00 c3 c5 21 |V.\n....|.!.....!|
|00000d60| 86 17 00 c6 1e 07 c8 0e | 07 21 1e 09 ca 0e 09 50 |........|.!.....P|
|00000d70| 1e 0b cc cd 0e 09 ce 51 | 21 1e 0f d0 d1 d2 0e 07 |.......Q|!.......|
|00000d80| d3 0e 0b 21 85 3c 00 0e | 0b 0e 0f 83 4e 00 d4 0e |...!.<..|....N...|
|00000d90| 0f 21 83 4e 00 0e 0f 4a | 82 4f 00 d5 25 71 88 d6 |.!.N...J|.O..%q..|
|00000da0| 20 88 2c d7 c1 21 87 22 | 20 5b 63 6f 6d 69 6e 74 | .,..!."| [comint|
|00000db0| 2d 63 68 65 63 6b 2d 70 | 72 6f 63 20 22 2a 73 68 |-check-p|roc "*sh|
|00000dc0| 65 6c 6c 2a 22 20 65 78 | 70 6c 69 63 69 74 2d 73 |ell*" ex|plicit-s|
|00000dd0| 68 65 6c 6c 2d 66 69 6c | 65 2d 6e 61 6d 65 20 67 |hell-fil|e-name g|
|00000de0| 65 74 65 6e 76 20 22 45 | 53 48 45 4c 4c 22 20 22 |etenv "E|SHELL" "|
|00000df0| 53 48 45 4c 4c 22 20 22 | 2f 62 69 6e 2f 73 68 22 |SHELL" "|/bin/sh"|
|00000e00| 20 70 72 6f 67 20 66 69 | 6c 65 2d 6e 61 6d 65 2d | prog fi|le-name-|
|00000e10| 6e 6f 6e 64 69 72 65 63 | 74 6f 72 79 20 6e 61 6d |nondirec|tory nam|
|00000e20| 65 20 22 7e 2f 2e 65 6d | 61 63 73 5f 22 20 73 74 |e "~/.em|acs_" st|
|00000e30| 61 72 74 66 69 6c 65 20 | 69 6e 74 65 72 6e 2d 73 |artfile |intern-s|
|00000e40| 6f 66 74 20 22 65 78 70 | 6c 69 63 69 74 2d 22 20 |oft "exp|licit-" |
|00000e50| 22 2d 61 72 67 73 22 20 | 78 61 72 67 73 2d 6e 61 |"-args" |xargs-na|
|00000e60| 6d 65 20 61 70 70 6c 79 | 20 6d 61 6b 65 2d 63 6f |me apply| make-co|
|00000e70| 6d 69 6e 74 20 22 73 68 | 65 6c 6c 22 20 66 69 6c |mint "sh|ell" fil|
|00000e80| 65 2d 65 78 69 73 74 73 | 2d 70 20 62 6f 75 6e 64 |e-exists|-p bound|
|00000e90| 70 20 28 22 2d 69 22 29 | 20 73 68 65 6c 6c 2d 6d |p ("-i")| shell-m|
|00000ea0| 6f 64 65 20 73 77 69 74 | 63 68 2d 74 6f 2d 62 75 |ode swit|ch-to-bu|
|00000eb0| 66 66 65 72 5d 20 37 20 | 22 5c 0a 52 75 6e 20 61 |ffer] 7 |"\.Run a|
|00000ec0| 6e 20 69 6e 66 65 72 69 | 6f 72 20 73 68 65 6c 6c |n inferi|or shell|
|00000ed0| 2c 20 77 69 74 68 20 49 | 2f 4f 20 74 68 72 6f 75 |, with I|/O throu|
|00000ee0| 67 68 20 62 75 66 66 65 | 72 20 2a 73 68 65 6c 6c |gh buffe|r *shell|
|00000ef0| 2a 2e 0a 49 66 20 62 75 | 66 66 65 72 20 65 78 69 |*..If bu|ffer exi|
|00000f00| 73 74 73 20 62 75 74 20 | 73 68 65 6c 6c 20 70 72 |sts but |shell pr|
|00000f10| 6f 63 65 73 73 20 69 73 | 20 6e 6f 74 20 72 75 6e |ocess is| not run|
|00000f20| 6e 69 6e 67 2c 20 6d 61 | 6b 65 20 6e 65 77 20 73 |ning, ma|ke new s|
|00000f30| 68 65 6c 6c 2e 0a 49 66 | 20 62 75 66 66 65 72 20 |hell..If| buffer |
|00000f40| 65 78 69 73 74 73 20 61 | 6e 64 20 73 68 65 6c 6c |exists a|nd shell|
|00000f50| 20 70 72 6f 63 65 73 73 | 20 69 73 20 72 75 6e 6e | process| is runn|
|00000f60| 69 6e 67 2c 20 0a 20 6a | 75 73 74 20 73 77 69 74 |ing, . j|ust swit|
|00000f70| 63 68 20 74 6f 20 62 75 | 66 66 65 72 20 60 2a 73 |ch to bu|ffer `*s|
|00000f80| 68 65 6c 6c 2a 27 2e 0a | 50 72 6f 67 72 61 6d 20 |hell*'..|Program |
|00000f90| 75 73 65 64 20 63 6f 6d | 65 73 20 66 72 6f 6d 20 |used com|es from |
|00000fa0| 76 61 72 69 61 62 6c 65 | 20 60 65 78 70 6c 69 63 |variable| `explic|
|00000fb0| 69 74 2d 73 68 65 6c 6c | 2d 66 69 6c 65 2d 6e 61 |it-shell|-file-na|
|00000fc0| 6d 65 27 2c 0a 20 6f 72 | 20 28 69 66 20 74 68 61 |me',. or| (if tha|
|00000fd0| 74 20 69 73 20 6e 69 6c | 29 20 66 72 6f 6d 20 74 |t is nil|) from t|
|00000fe0| 68 65 20 45 53 48 45 4c | 4c 20 65 6e 76 69 72 6f |he ESHEL|L enviro|
|00000ff0| 6e 6d 65 6e 74 20 76 61 | 72 69 61 62 6c 65 2c 0a |nment va|riable,.|
|00001000| 20 6f 72 20 65 6c 73 65 | 20 66 72 6f 6d 20 53 48 | or else| from SH|
|00001010| 45 4c 4c 20 69 66 20 74 | 68 65 72 65 20 69 73 20 |ELL if t|here is |
|00001020| 6e 6f 20 45 53 48 45 4c | 4c 2e 0a 49 66 20 61 20 |no ESHEL|L..If a |
|00001030| 66 69 6c 65 20 60 7e 2f | 2e 65 6d 61 63 73 5f 53 |file `~/|.emacs_S|
|00001040| 48 45 4c 4c 4e 41 4d 45 | 27 20 65 78 69 73 74 73 |HELLNAME|' exists|
|00001050| 2c 20 69 74 20 69 73 20 | 67 69 76 65 6e 20 61 73 |, it is |given as|
|00001060| 20 69 6e 69 74 69 61 6c | 20 69 6e 70 75 74 0a 20 | initial| input. |
|00001070| 28 4e 6f 74 65 20 74 68 | 61 74 20 74 68 69 73 20 |(Note th|at this |
|00001080| 6d 61 79 20 6c 6f 73 65 | 20 64 75 65 20 74 6f 20 |may lose| due to |
|00001090| 61 20 74 69 6d 69 6e 67 | 20 65 72 72 6f 72 20 69 |a timing| error i|
|000010a0| 66 20 74 68 65 20 73 68 | 65 6c 6c 0a 20 20 64 69 |f the sh|ell. di|
|000010b0| 73 63 61 72 64 73 20 69 | 6e 70 75 74 20 77 68 65 |scards i|nput whe|
|000010c0| 6e 20 69 74 20 73 74 61 | 72 74 73 20 75 70 2e 29 |n it sta|rts up.)|
|000010d0| 0a 54 68 65 20 62 75 66 | 66 65 72 20 69 73 20 70 |.The buf|fer is p|
|000010e0| 75 74 20 69 6e 20 53 68 | 65 6c 6c 20 6d 6f 64 65 |ut in Sh|ell mode|
|000010f0| 2c 20 67 69 76 69 6e 67 | 20 63 6f 6d 6d 61 6e 64 |, giving| command|
|00001100| 73 20 66 6f 72 20 73 65 | 6e 64 69 6e 67 20 69 6e |s for se|nding in|
|00001110| 70 75 74 0a 61 6e 64 20 | 63 6f 6e 74 72 6f 6c 6c |put.and |controll|
|00001120| 69 6e 67 20 74 68 65 20 | 73 75 62 6a 6f 62 73 20 |ing the |subjobs |
|00001130| 6f 66 20 74 68 65 20 73 | 68 65 6c 6c 2e 20 20 53 |of the s|hell. S|
|00001140| 65 65 20 60 73 68 65 6c | 6c 2d 6d 6f 64 65 27 2e |ee `shel|l-mode'.|
|00001150| 0a 53 65 65 20 61 6c 73 | 6f 20 74 68 65 20 76 61 |.See als|o the va|
|00001160| 72 69 61 62 6c 65 20 60 | 73 68 65 6c 6c 2d 70 72 |riable `|shell-pr|
|00001170| 6f 6d 70 74 2d 70 61 74 | 74 65 72 6e 27 2e 0a 0a |ompt-pat|tern'...|
|00001180| 54 68 65 20 73 68 65 6c | 6c 20 66 69 6c 65 20 6e |The shel|l file n|
|00001190| 61 6d 65 20 28 73 61 6e | 73 20 64 69 72 65 63 74 |ame (san|s direct|
|000011a0| 6f 72 69 65 73 29 20 69 | 73 20 75 73 65 64 20 74 |ories) i|s used t|
|000011b0| 6f 20 6d 61 6b 65 20 61 | 20 73 79 6d 62 6f 6c 20 |o make a| symbol |
|000011c0| 6e 61 6d 65 0a 73 75 63 | 68 20 61 73 20 60 65 78 |name.suc|h as `ex|
|000011d0| 70 6c 69 63 69 74 2d 63 | 73 68 2d 61 72 67 73 27 |plicit-c|sh-args'|
|000011e0| 2e 20 20 49 66 20 74 68 | 61 74 20 73 79 6d 62 6f |. If th|at symbo|
|000011f0| 6c 20 69 73 20 61 20 76 | 61 72 69 61 62 6c 65 2c |l is a v|ariable,|
|00001200| 0a 69 74 73 20 76 61 6c | 75 65 20 69 73 20 75 73 |.its val|ue is us|
|00001210| 65 64 20 61 73 20 61 20 | 6c 69 73 74 20 6f 66 20 |ed as a |list of |
|00001220| 61 72 67 75 6d 65 6e 74 | 73 20 77 68 65 6e 20 69 |argument|s when i|
|00001230| 6e 76 6f 6b 69 6e 67 20 | 74 68 65 20 73 68 65 6c |nvoking |the shel|
|00001240| 6c 2e 0a 4f 74 68 65 72 | 77 69 73 65 2c 20 6f 6e |l..Other|wise, on|
|00001250| 65 20 61 72 67 75 6d 65 | 6e 74 20 60 2d 69 27 20 |e argume|nt `-i' |
|00001260| 69 73 20 70 61 73 73 65 | 64 20 74 6f 20 74 68 65 |is passe|d to the|
|00001270| 20 73 68 65 6c 6c 2e 0a | 0a 28 54 79 70 65 20 5c | shell..|.(Type \|
|00001280| 5c 5b 64 65 73 63 72 69 | 62 65 2d 6d 6f 64 65 5d |\[descri|be-mode]|
|00001290| 20 69 6e 20 74 68 65 20 | 73 68 65 6c 6c 20 62 75 | in the |shell bu|
|000012a0| 66 66 65 72 20 66 6f 72 | 20 61 20 6c 69 73 74 20 |ffer for| a list |
|000012b0| 6f 66 20 63 6f 6d 6d 61 | 6e 64 73 2e 29 22 20 6e |of comma|nds.)" n|
|000012c0| 69 6c 5d 29 0a 28 64 65 | 66 61 6c 69 61 73 20 28 |il]).(de|falias (|
|000012d0| 71 75 6f 74 65 20 73 68 | 65 6c 6c 2d 66 72 6f 6e |quote sh|ell-fron|
|000012e0| 74 2d 6d 61 74 63 68 29 | 20 23 5b 28 72 65 67 65 |t-match)| #[(rege|
|000012f0| 78 70 20 73 74 72 20 73 | 74 61 72 74 29 20 22 08 |xp str s|tart) ".|
|00001300| c1 5c 6e 0b 08 23 3d 87 | 22 20 5b 73 74 61 72 74 |.\n..#=.|" [start|
|00001310| 20 73 74 72 69 6e 67 2d | 6d 61 74 63 68 20 72 65 | string-|match re|
|00001320| 67 65 78 70 20 73 74 72 | 5d 20 35 5d 29 0a 28 64 |gexp str|] 5]).(d|
|00001330| 65 66 61 6c 69 61 73 20 | 27 73 68 65 6c 6c 2d 64 |efalias |'shell-d|
|00001340| 69 72 65 63 74 6f 72 79 | 2d 74 72 61 63 6b 65 72 |irectory|-tracker|
|00001350| 20 23 5b 28 73 74 72 29 | 20 22 c0 c1 c2 8f 87 22 | #[(str)| "....."|
|00001360| 20 5b 65 72 72 20 28 62 | 79 74 65 2d 63 6f 64 65 | [err (b|yte-code|
|00001370| 20 22 08 85 50 00 c1 c2 | 0b 5c 22 88 c4 95 c5 1e | "..P...|.\".....|
|00001380| 06 1e 07 c8 0e 09 0b 0e | 07 23 89 16 06 83 26 00 |........|.#....&.|
|00001390| ca cb 0e 06 21 21 82 4f | 00 c8 0e 0c 0b 0e 07 23 |....!!.O|.......#|
|000013a0| 89 16 06 83 3c 00 cd cb | 0e 06 21 21 82 4f 00 c8 |....<...|..!!.O..|
|000013b0| 0e 0e 0b 0e 07 23 89 16 | 06 85 4f 00 cf cb 0e 06 |.....#..|..O.....|
|000013c0| 21 21 2a 87 22 20 5b 73 | 68 65 6c 6c 2d 64 69 72 |!!*." [s|hell-dir|
|000013d0| 74 72 61 63 6b 70 20 73 | 74 72 69 6e 67 2d 6d 61 |trackp s|tring-ma|
|000013e0| 74 63 68 20 22 5e 5c 5c | 73 20 2a 22 20 73 74 72 |tch "^\\|s *" str|
|000013f0| 20 30 20 6e 69 6c 20 78 | 20 62 6f 73 20 73 68 65 | 0 nil x| bos she|
|00001400| 6c 6c 2d 6d 61 74 63 68 | 2d 63 6d 64 2d 77 2f 6f |ll-match|-cmd-w/o|
|00001410| 70 74 69 6f 6e 61 6c 2d | 61 72 67 20 73 68 65 6c |ptional-|arg shel|
|00001420| 6c 2d 70 6f 70 64 2d 72 | 65 67 65 78 70 20 73 68 |l-popd-r|egexp sh|
|00001430| 65 6c 6c 2d 70 72 6f 63 | 65 73 73 2d 70 6f 70 64 |ell-proc|ess-popd|
|00001440| 20 73 75 62 73 74 69 74 | 75 74 65 2d 69 6e 2d 66 | substit|ute-in-f|
|00001450| 69 6c 65 2d 6e 61 6d 65 | 20 73 68 65 6c 6c 2d 70 |ile-name| shell-p|
|00001460| 75 73 68 64 2d 72 65 67 | 65 78 70 20 73 68 65 6c |ushd-reg|exp shel|
|00001470| 6c 2d 70 72 6f 63 65 73 | 73 2d 70 75 73 68 64 20 |l-proces|s-pushd |
|00001480| 73 68 65 6c 6c 2d 63 64 | 2d 72 65 67 65 78 70 20 |shell-cd|-regexp |
|00001490| 73 68 65 6c 6c 2d 70 72 | 6f 63 65 73 73 2d 63 64 |shell-pr|ocess-cd|
|000014a0| 5d 20 34 29 20 28 28 65 | 72 72 6f 72 20 28 62 79 |] 4) ((e|rror (by|
|000014b0| 74 65 2d 63 6f 64 65 20 | 22 c0 09 41 40 21 87 22 |te-code |"..A@!."|
|000014c0| 20 5b 6d 65 73 73 61 67 | 65 20 65 72 72 5d 20 32 | [messag|e err] 2|
|000014d0| 29 29 29 5d 20 33 20 22 | 5c 0a 54 72 61 63 6b 73 |)))] 3 "|\.Tracks|
|000014e0| 20 63 64 2c 20 70 75 73 | 68 64 20 61 6e 64 20 70 | cd, pus|hd and p|
|000014f0| 6f 70 64 20 63 6f 6d 6d | 61 6e 64 73 20 69 73 73 |opd comm|ands iss|
|00001500| 75 65 64 20 74 6f 20 74 | 68 65 20 73 68 65 6c 6c |ued to t|he shell|
|00001510| 2e 0a 54 68 69 73 20 66 | 75 6e 63 74 69 6f 6e 20 |..This f|unction |
|00001520| 69 73 20 63 61 6c 6c 65 | 64 20 6f 6e 20 65 61 63 |is calle|d on eac|
|00001530| 68 20 69 6e 70 75 74 20 | 70 61 73 73 65 64 20 74 |h input |passed t|
|00001540| 6f 20 74 68 65 20 73 68 | 65 6c 6c 2e 0a 49 74 20 |o the sh|ell..It |
|00001550| 77 61 74 63 68 65 73 20 | 66 6f 72 20 63 64 2c 20 |watches |for cd, |
|00001560| 70 75 73 68 64 20 61 6e | 64 20 70 6f 70 64 20 63 |pushd an|d popd c|
|00001570| 6f 6d 6d 61 6e 64 73 20 | 61 6e 64 20 73 65 74 73 |ommands |and sets|
|00001580| 20 74 68 65 20 62 75 66 | 66 65 72 27 73 0a 64 65 | the buf|fer's.de|
|00001590| 66 61 75 6c 74 20 64 69 | 72 65 63 74 6f 72 79 20 |fault di|rectory |
|000015a0| 74 6f 20 74 72 61 63 6b | 20 74 68 65 73 65 20 63 |to track| these c|
|000015b0| 6f 6d 6d 61 6e 64 73 2e | 0a 0a 59 6f 75 20 6d 61 |ommands.|..You ma|
|000015c0| 79 20 74 6f 67 67 6c 65 | 20 74 68 69 73 20 74 72 |y toggle| this tr|
|000015d0| 61 63 6b 69 6e 67 20 6f | 6e 20 61 6e 64 20 6f 66 |acking o|n and of|
|000015e0| 66 20 77 69 74 68 20 4d | 2d 78 20 64 69 72 74 72 |f with M|-x dirtr|
|000015f0| 61 63 6b 2d 74 6f 67 67 | 6c 65 2e 0a 49 66 20 65 |ack-togg|le..If e|
|00001600| 6d 61 63 73 20 67 65 74 | 73 20 63 6f 6e 66 75 73 |macs get|s confus|
|00001610| 65 64 2c 20 79 6f 75 20 | 63 61 6e 20 72 65 73 79 |ed, you |can resy|
|00001620| 6e 63 20 77 69 74 68 20 | 74 68 65 20 73 68 65 6c |nc with |the shel|
|00001630| 6c 20 77 69 74 68 20 4d | 2d 78 20 64 69 72 73 2e |l with M|-x dirs.|
|00001640| 0a 0a 53 65 65 20 76 61 | 72 69 61 62 6c 65 73 20 |..See va|riables |
|00001650| 60 73 68 65 6c 6c 2d 63 | 64 2d 72 65 67 65 78 70 |`shell-c|d-regexp|
|00001660| 27 2c 20 60 73 68 65 6c | 6c 2d 70 75 73 68 64 2d |', `shel|l-pushd-|
|00001670| 72 65 67 65 78 70 27 2c | 20 61 6e 64 20 60 73 68 |regexp',| and `sh|
|00001680| 65 6c 6c 2d 70 6f 70 64 | 2d 72 65 67 65 78 70 27 |ell-popd|-regexp'|
|00001690| 2e 0a 45 6e 76 69 72 6f | 6e 6d 65 6e 74 20 76 61 |..Enviro|nment va|
|000016a0| 72 69 61 62 6c 65 73 20 | 61 72 65 20 65 78 70 61 |riables |are expa|
|000016b0| 6e 64 65 64 2c 20 73 65 | 65 20 66 75 6e 63 74 69 |nded, se|e functi|
|000016c0| 6f 6e 20 60 73 75 62 73 | 74 69 74 75 74 65 2d 69 |on `subs|titute-i|
|000016d0| 6e 2d 66 69 6c 65 2d 6e | 61 6d 65 27 2e 22 5d 29 |n-file-n|ame'."])|
|000016e0| 0a 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c0 c1 c2 |.(byte-c|ode "...|
|000016f0| 5c 22 88 c0 c3 c4 5c 22 | 88 c0 c5 c6 5c 22 88 c0 |\"....\"|....\"..|
|00001700| c7 c8 5c 22 88 c0 c9 ca | 5c 22 87 22 20 5b 64 65 |..\"....|\"." [de|
|00001710| 66 61 6c 69 61 73 20 73 | 68 65 6c 6c 2d 6d 61 74 |falias s|hell-mat|
|00001720| 63 68 2d 63 6d 64 2d 77 | 2f 6f 70 74 69 6f 6e 61 |ch-cmd-w|/optiona|
|00001730| 6c 2d 61 72 67 20 23 5b | 28 63 6d 64 20 73 74 72 |l-arg #[|(cmd str|
|00001740| 20 73 74 61 72 74 29 20 | 22 c0 09 5c 6e 0b 23 85 | start) |"..\n.#.|
|00001750| 2a 00 c4 95 1d c0 c6 5c | 6e 0d 23 83 17 00 c7 82 |*......\|n.#.....|
|00001760| 29 00 c0 c8 5c 6e 0d 23 | 83 28 00 5c 6e c9 94 c9 |)...\n.#|.(.\n...|
|00001770| 95 4f 82 29 00 ca 29 87 | 22 20 5b 73 68 65 6c 6c |.O.)..).|" [shell|
|00001780| 2d 66 72 6f 6e 74 2d 6d | 61 74 63 68 20 63 6d 64 |-front-m|atch cmd|
|00001790| 20 73 74 72 20 73 74 61 | 72 74 20 30 20 65 6f 63 | str sta|rt 0 eoc|
|000017a0| 20 22 5c 5c 73 20 2a 5c | 5c 28 3b 5c 5c 7c 24 5c | "\\s *\|\(;\\|$\|
|000017b0| 5c 29 22 20 22 22 20 22 | 5c 5c 73 20 2b 5c 5c 28 |\)" "" "|\\s +\\(|
|000017c0| 5b 5e 20 09 3b 5d 2b 5c | 5c 29 5c 5c 73 20 2a 5c |[^ .;]+\|\)\\s *\|
|000017d0| 5c 28 3b 5c 5c 7c 24 5c | 5c 29 22 20 31 20 6e 69 |\(;\\|$\|\)" 1 ni|
|000017e0| 6c 5d 20 34 5d 20 73 68 | 65 6c 6c 2d 70 72 6f 63 |l] 4] sh|ell-proc|
|000017f0| 65 73 73 2d 70 6f 70 64 | 20 23 5b 28 61 72 67 29 |ess-popd| #[(arg)|
|00001800| 20 22 08 47 c1 55 83 0b | 00 c1 82 0e 00 c2 08 21 | ".G.U..|.......!|
|00001810| 89 1b 83 44 00 0b 0c 47 | 57 83 44 00 0b c1 55 83 |...D...G|W.D...U.|
|00001820| 27 00 c5 c6 c7 8f 82 47 | 00 c5 0c 42 1e 08 0b c9 |'......G|...B....|
|00001830| 5a 0e 08 9b 89 1e 5c 6e | 89 41 41 a1 88 0e 08 41 |Z.....\n|.AA....A|
|00001840| 14 cb 20 2a 82 47 00 cc | cd 21 29 87 22 20 5b 61 |.. *.G..|.!)." [a|
|00001850| 72 67 20 30 20 73 68 65 | 6c 6c 2d 65 78 74 72 61 |rg 0 she|ll-extra|
|00001860| 63 74 2d 6e 75 6d 20 6e | 75 6d 20 73 68 65 6c 6c |ct-num n|um shell|
|00001870| 2d 64 69 72 73 74 61 63 | 6b 20 6e 69 6c 20 28 62 |-dirstac|k nil (b|
|00001880| 79 74 65 2d 63 6f 64 65 | 20 22 c0 09 40 21 88 09 |yte-code| "..@!..|
|00001890| 41 11 c2 20 87 22 20 5b | 63 64 20 73 68 65 6c 6c |A.. ." [|cd shell|
|000018a0| 2d 64 69 72 73 74 61 63 | 6b 20 73 68 65 6c 6c 2d |-dirstac|k shell-|
|000018b0| 64 69 72 73 74 61 63 6b | 2d 6d 65 73 73 61 67 65 |dirstack|-message|
|000018c0| 5d 20 32 29 20 28 28 65 | 72 72 6f 72 20 28 6d 65 |] 2) ((e|rror (me|
|000018d0| 73 73 61 67 65 20 22 43 | 6f 75 6c 64 6e 27 74 20 |ssage "C|ouldn't |
|000018e0| 63 64 2e 22 29 29 29 20 | 64 73 20 31 20 63 65 6c |cd."))) |ds 1 cel|
|000018f0| 6c 20 73 68 65 6c 6c 2d | 64 69 72 73 74 61 63 6b |l shell-|dirstack|
|00001900| 2d 6d 65 73 73 61 67 65 | 20 6d 65 73 73 61 67 65 |-message| message|
|00001910| 20 22 42 61 64 20 70 6f | 70 64 2e 22 5d 20 34 5d | "Bad po|pd."] 4]|
|00001920| 20 73 68 65 6c 6c 2d 70 | 72 6f 63 65 73 73 2d 63 | shell-p|rocess-c|
|00001930| 64 20 23 5b 28 61 72 67 | 29 20 22 c0 c1 c2 8f 87 |d #[(arg|) ".....|
|00001940| 22 20 5b 6e 69 6c 20 28 | 62 79 74 65 2d 63 6f 64 |" [nil (|byte-cod|
|00001950| 65 20 22 08 47 c1 55 83 | 0d 00 c2 c3 21 82 18 00 |e ".G.U.|....!...|
|00001960| 08 c4 98 83 17 00 0d 82 | 18 00 08 1e 06 0e 07 15 |........|........|
|00001970| c8 0e 06 21 88 c9 20 29 | 87 22 20 5b 61 72 67 20 |...!.. )|." [arg |
|00001980| 30 20 67 65 74 65 6e 76 | 20 22 48 4f 4d 45 22 20 |0 getenv| "HOME" |
|00001990| 22 2d 22 20 73 68 65 6c | 6c 2d 6c 61 73 74 2d 64 |"-" shel|l-last-d|
|000019a0| 69 72 20 6e 65 77 2d 64 | 69 72 20 64 65 66 61 75 |ir new-d|ir defau|
|000019b0| 6c 74 2d 64 69 72 65 63 | 74 6f 72 79 20 63 64 20 |lt-direc|tory cd |
|000019c0| 73 68 65 6c 6c 2d 64 69 | 72 73 74 61 63 6b 2d 6d |shell-di|rstack-m|
|000019d0| 65 73 73 61 67 65 5d 20 | 32 29 20 28 28 65 72 72 |essage] |2) ((err|
|000019e0| 6f 72 20 28 6d 65 73 73 | 61 67 65 20 22 43 6f 75 |or (mess|age "Cou|
|000019f0| 6c 64 6e 27 74 20 63 64 | 2e 22 29 29 29 5d 20 33 |ldn't cd|.")))] 3|
|00001a00| 5d 20 73 68 65 6c 6c 2d | 70 72 6f 63 65 73 73 2d |] shell-|process-|
|00001a10| 70 75 73 68 64 20 23 5b | 28 61 72 67 29 20 22 08 |pushd #[|(arg) ".|
|00001a20| 47 c1 55 83 0c 00 c2 c3 | c4 8f 87 c5 08 21 89 1e |G.U.....|.....!..|
|00001a30| 06 83 54 00 0e 06 0e 07 | 47 56 83 24 00 c8 c9 21 |..T.....|GV.$...!|
|00001a40| 82 5d 00 0e 5c 6e 0e 07 | 42 89 1e 0b 47 1e 0c 0e |.]..\n..|B...G...|
|00001a50| 06 0e 0b 9b 1e 0d ce 0e | 0c 0e 06 5a ce 0e 0b 21 |........|...Z...!|
|00001a60| 9b 21 1e 0f d0 0e 0d 0e | 0f 5c 22 1e 11 c2 d2 d3 |.!......|.\".....|
|00001a70| 8f 2d 82 5d 00 0e 5c 6e | 1e 14 c2 d5 d6 8f 29 29 |.-.]..\n|......))|
|00001a80| 87 22 20 5b 61 72 67 20 | 30 20 6e 69 6c 20 28 62 |." [arg |0 nil (b|
|00001a90| 79 74 65 2d 63 6f 64 65 | 20 22 08 83 14 00 09 1a |yte-code| "......|
|00001aa0| c3 08 40 21 88 5c 6e 08 | 41 42 10 c4 20 29 87 c5 |..@!.\n.|AB.. )..|
|00001ab0| c6 21 87 22 20 5b 73 68 | 65 6c 6c 2d 64 69 72 73 |.!." [sh|ell-dirs|
|00001ac0| 74 61 63 6b 20 64 65 66 | 61 75 6c 74 2d 64 69 72 |tack def|ault-dir|
|00001ad0| 65 63 74 6f 72 79 20 6f | 6c 64 20 63 64 20 73 68 |ectory o|ld cd sh|
|00001ae0| 65 6c 6c 2d 64 69 72 73 | 74 61 63 6b 2d 6d 65 73 |ell-dirs|tack-mes|
|00001af0| 73 61 67 65 20 6d 65 73 | 73 61 67 65 20 22 44 69 |sage mes|sage "Di|
|00001b00| 72 65 63 74 6f 72 79 20 | 73 74 61 63 6b 20 65 6d |rectory |stack em|
|00001b10| 70 74 79 2e 22 5d 20 32 | 29 20 28 28 6d 65 73 73 |pty."] 2|) ((mess|
|00001b20| 61 67 65 20 22 43 6f 75 | 6c 64 6e 27 74 20 63 64 |age "Cou|ldn't cd|
|00001b30| 2e 22 29 29 20 73 68 65 | 6c 6c 2d 65 78 74 72 61 |.")) she|ll-extra|
|00001b40| 63 74 2d 6e 75 6d 20 6e | 75 6d 20 73 68 65 6c 6c |ct-num n|um shell|
|00001b50| 2d 64 69 72 73 74 61 63 | 6b 20 6d 65 73 73 61 67 |-dirstac|k messag|
|00001b60| 65 20 22 44 69 72 65 63 | 74 6f 72 79 20 73 74 61 |e "Direc|tory sta|
|00001b70| 63 6b 20 6e 6f 74 20 74 | 68 61 74 20 64 65 65 70 |ck not t|hat deep|
|00001b80| 2e 22 20 64 65 66 61 75 | 6c 74 2d 64 69 72 65 63 |." defau|lt-direc|
|00001b90| 74 6f 72 79 20 64 73 20 | 64 73 6c 65 6e 20 66 72 |tory ds |dslen fr|
|00001ba0| 6f 6e 74 20 72 65 76 65 | 72 73 65 20 62 61 63 6b |ont reve|rse back|
|00001bb0| 20 61 70 70 65 6e 64 20 | 6e 65 77 2d 64 73 20 28 | append |new-ds (|
|00001bc0| 62 79 74 65 2d 63 6f 64 | 65 20 22 c0 09 40 21 88 |byte-cod|e "..@!.|
|00001bd0| 09 41 12 c3 20 87 22 20 | 5b 63 64 20 6e 65 77 2d |.A.. ." |[cd new-|
|00001be0| 64 73 20 73 68 65 6c 6c | 2d 64 69 72 73 74 61 63 |ds shell|-dirstac|
|00001bf0| 6b 20 73 68 65 6c 6c 2d | 64 69 72 73 74 61 63 6b |k shell-|dirstack|
|00001c00| 2d 6d 65 73 73 61 67 65 | 5d 20 32 29 20 28 28 65 |-message|] 2) ((e|
|00001c10| 72 72 6f 72 20 28 6d 65 | 73 73 61 67 65 20 22 43 |rror (me|ssage "C|
|00001c20| 6f 75 6c 64 6e 27 74 20 | 63 64 2e 22 29 29 29 20 |ouldn't |cd."))) |
|00001c30| 6f 6c 64 2d 77 64 20 28 | 62 79 74 65 2d 63 6f 64 |old-wd (|byte-cod|
|00001c40| 65 20 22 c0 09 21 88 5c | 6e 0b 42 13 c4 20 87 22 |e "..!.\|n.B.. ."|
|00001c50| 20 5b 63 64 20 61 72 67 | 20 6f 6c 64 2d 77 64 20 | [cd arg| old-wd |
|00001c60| 73 68 65 6c 6c 2d 64 69 | 72 73 74 61 63 6b 20 73 |shell-di|rstack s|
|00001c70| 68 65 6c 6c 2d 64 69 72 | 73 74 61 63 6b 2d 6d 65 |hell-dir|stack-me|
|00001c80| 73 73 61 67 65 5d 20 32 | 29 20 28 28 65 72 72 6f |ssage] 2|) ((erro|
|00001c90| 72 20 28 6d 65 73 73 61 | 67 65 20 22 43 6f 75 6c |r (messa|ge "Coul|
|00001ca0| 64 6e 27 74 20 63 64 2e | 22 29 29 29 5d 20 35 5d |dn't cd.|")))] 5]|
|00001cb0| 20 73 68 65 6c 6c 2d 65 | 78 74 72 61 63 74 2d 6e | shell-e|xtract-n|
|00001cc0| 75 6d 20 23 5b 28 73 74 | 72 29 20 22 c0 c1 5c 6e |um #[(st|r) "..\n|
|00001cd0| 5c 22 85 5c 6e 00 c3 5c | 6e 21 87 22 20 5b 73 74 |\".\n..\|n!." [st|
|00001ce0| 72 69 6e 67 2d 6d 61 74 | 63 68 20 22 5e 5c 5c 2b |ring-mat|ch "^\\+|
|00001cf0| 5b 31 2d 39 5d 5b 30 2d | 39 5d 2a 24 22 20 73 74 |[1-9][0-|9]*$" st|
|00001d00| 72 20 73 74 72 69 6e 67 | 2d 74 6f 2d 69 6e 74 5d |r string|-to-int]|
|00001d10| 20 33 5d 5d 20 33 29 0a | 28 64 65 66 61 6c 69 61 | 3]] 3).|(defalia|
|00001d20| 73 20 27 73 68 65 6c 6c | 2d 64 69 72 74 72 61 63 |s 'shell|-dirtrac|
|00001d30| 6b 2d 74 6f 67 67 6c 65 | 20 23 5b 6e 69 6c 20 22 |k-toggle| #[nil "|
|00001d40| 08 3f 10 c1 c2 08 83 0d | 00 c3 82 0e 00 c4 5c 22 |.?......|......\"|
|00001d50| 87 22 20 5b 73 68 65 6c | 6c 2d 64 69 72 74 72 61 |." [shel|l-dirtra|
|00001d60| 63 6b 70 20 6d 65 73 73 | 61 67 65 20 22 64 69 72 |ckp mess|age "dir|
|00001d70| 65 63 74 6f 72 79 20 74 | 72 61 63 6b 69 6e 67 20 |ectory t|racking |
|00001d80| 25 73 2e 22 20 22 4f 4e | 22 20 22 4f 46 46 22 5d |%s." "ON|" "OFF"]|
|00001d90| 20 33 20 22 5c 0a 54 75 | 72 6e 20 64 69 72 65 63 | 3 "\.Tu|rn direc|
|00001da0| 74 6f 72 79 20 74 72 61 | 63 6b 69 6e 67 20 6f 6e |tory tra|cking on|
|00001db0| 20 61 6e 64 20 6f 66 66 | 20 69 6e 20 61 20 73 68 | and off| in a sh|
|00001dc0| 65 6c 6c 20 62 75 66 66 | 65 72 2e 22 20 6e 69 6c |ell buff|er." nil|
|00001dd0| 5d 29 0a 28 64 65 66 61 | 6c 69 61 73 20 28 71 75 |]).(defa|lias (qu|
|00001de0| 6f 74 65 20 64 69 72 74 | 72 61 63 6b 2d 74 6f 67 |ote dirt|rack-tog|
|00001df0| 67 6c 65 29 20 28 71 75 | 6f 74 65 20 73 68 65 6c |gle) (qu|ote shel|
|00001e00| 6c 2d 64 69 72 74 72 61 | 63 6b 2d 74 6f 67 67 6c |l-dirtra|ck-toggl|
|00001e10| 65 29 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 73 |e)).(def|alias 's|
|00001e20| 68 65 6c 6c 2d 72 65 73 | 79 6e 63 2d 64 69 72 73 |hell-res|ync-dirs|
|00001e30| 20 23 5b 6e 69 6c 20 22 | c0 70 21 19 c2 09 21 89 | #[nil "|.p!...!.|
|00001e40| 1b 62 88 0c 63 88 c5 63 | 88 c6 c7 21 88 c8 09 0c |.b..c..c|...!....|
|00001e50| 5c 22 88 c8 09 c5 5c 22 | 88 0b 60 c9 93 88 60 1e |\"....\"|..`...`.|
|00001e60| 5c 6e c5 63 88 cb cc 21 | 88 cd ce 21 84 3f 00 cf |\n.c...!|...!.?..|
|00001e70| 09 21 88 0e 5c 6e 62 88 | 82 2e 00 29 0b 62 88 d0 |.!..\nb.|...).b..|
|00001e80| cc 21 88 c7 94 c7 95 cc | 5a 7b 89 1e 11 47 1e 12 |.!......|Z{...G..|
|00001e90| c9 1e 13 c7 1e 14 c7 0e | 12 57 83 7d 00 d5 d6 0e |........|.W.}....|
|00001ea0| 11 0e 14 23 88 0e 11 cc | 94 cc 95 4f 0e 13 42 16 |...#....|...O..B.|
|00001eb0| 13 c7 95 89 16 14 82 5b | 00 d7 0e 13 21 1e 13 c9 |.......[|....!...|
|00001ec0| d8 d9 8f 2e 07 87 22 20 | 5b 67 65 74 2d 62 75 66 |......" |[get-buf|
|00001ed0| 66 65 72 2d 70 72 6f 63 | 65 73 73 20 70 72 6f 63 |fer-proc|ess proc|
|00001ee0| 20 70 72 6f 63 65 73 73 | 2d 6d 61 72 6b 20 70 6d | process|-mark pm|
|00001ef0| 61 72 6b 20 73 68 65 6c | 6c 2d 64 69 72 73 74 61 |ark shel|l-dirsta|
|00001f00| 63 6b 2d 71 75 65 72 79 | 20 22 5c 6e 22 20 73 69 |ck-query| "\n" si|
|00001f10| 74 2d 66 6f 72 20 30 20 | 63 6f 6d 69 6e 74 2d 73 |t-for 0 |comint-s|
|00001f20| 65 6e 64 2d 73 74 72 69 | 6e 67 20 6e 69 6c 20 70 |end-stri|ng nil p|
|00001f30| 74 20 62 61 63 6b 77 61 | 72 64 2d 63 68 61 72 20 |t backwa|rd-char |
|00001f40| 31 20 6c 6f 6f 6b 69 6e | 67 2d 61 74 20 22 2e 2b |1 lookin|g-at ".+|
|00001f50| 5c 6e 22 20 61 63 63 65 | 70 74 2d 70 72 6f 63 65 |\n" acce|pt-proce|
|00001f60| 73 73 2d 6f 75 74 70 75 | 74 20 64 65 6c 65 74 65 |ss-outpu|t delete|
|00001f70| 2d 63 68 61 72 20 64 6c | 20 64 6c 2d 6c 65 6e 20 |-char dl| dl-len |
|00001f80| 64 73 20 69 20 73 74 72 | 69 6e 67 2d 6d 61 74 63 |ds i str|ing-matc|
|00001f90| 68 20 22 5c 5c 73 20 2a | 5c 5c 28 5c 5c 53 20 2b |h "\\s *|\\(\\S +|
|00001fa0| 5c 5c 29 5c 5c 73 20 2a | 22 20 72 65 76 65 72 73 |\\)\\s *|" revers|
|00001fb0| 65 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c0 09 |e (byte-|code "..|
|00001fc0| 40 21 88 09 41 12 c3 20 | 87 22 20 5b 63 64 20 64 |@!..A.. |." [cd d|
|00001fd0| 73 20 73 68 65 6c 6c 2d | 64 69 72 73 74 61 63 6b |s shell-|dirstack|
|00001fe0| 20 73 68 65 6c 6c 2d 64 | 69 72 73 74 61 63 6b 2d | shell-d|irstack-|
|00001ff0| 6d 65 73 73 61 67 65 5d | 20 32 29 20 28 28 65 72 |message]| 2) ((er|
|00002000| 72 6f 72 20 28 6d 65 73 | 73 61 67 65 20 22 43 6f |ror (mes|sage "Co|
|00002010| 75 6c 64 6e 27 74 20 63 | 64 2e 22 29 29 29 5d 20 |uldn't c|d.")))] |
|00002020| 35 20 22 5c 0a 52 65 73 | 79 6e 63 20 74 68 65 20 |5 "\.Res|ync the |
|00002030| 62 75 66 66 65 72 27 73 | 20 69 64 65 61 20 6f 66 |buffer's| idea of|
|00002040| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 64 69 72 | the cur|rent dir|
|00002050| 65 63 74 6f 72 79 20 73 | 74 61 63 6b 2e 0a 54 68 |ectory s|tack..Th|
|00002060| 69 73 20 63 6f 6d 6d 61 | 6e 64 20 71 75 65 72 69 |is comma|nd queri|
|00002070| 65 73 20 74 68 65 20 73 | 68 65 6c 6c 20 77 69 74 |es the s|hell wit|
|00002080| 68 20 74 68 65 20 63 6f | 6d 6d 61 6e 64 20 62 6f |h the co|mmand bo|
|00002090| 75 6e 64 20 74 6f 20 0a | 60 73 68 65 6c 6c 2d 64 |und to .|`shell-d|
|000020a0| 69 72 73 74 61 63 6b 2d | 71 75 65 72 79 27 20 28 |irstack-|query' (|
|000020b0| 64 65 66 61 75 6c 74 20 | 5c 22 64 69 72 73 5c 22 |default |\"dirs\"|
|000020c0| 29 2c 20 72 65 61 64 73 | 20 74 68 65 20 6e 65 78 |), reads| the nex|
|000020d0| 74 0a 6c 69 6e 65 20 6f | 75 74 70 75 74 20 61 6e |t.line o|utput an|
|000020e0| 64 20 70 61 72 73 65 73 | 20 69 74 20 74 6f 20 66 |d parses| it to f|
|000020f0| 6f 72 6d 20 74 68 65 20 | 6e 65 77 20 64 69 72 65 |orm the |new dire|
|00002100| 63 74 6f 72 79 20 73 74 | 61 63 6b 2e 0a 44 4f 4e |ctory st|ack..DON|
|00002110| 27 54 20 69 73 73 75 65 | 20 74 68 69 73 20 63 6f |'T issue| this co|
|00002120| 6d 6d 61 6e 64 20 75 6e | 6c 65 73 73 20 74 68 65 |mmand un|less the|
|00002130| 20 62 75 66 66 65 72 20 | 69 73 20 61 74 20 61 20 | buffer |is at a |
|00002140| 73 68 65 6c 6c 20 70 72 | 6f 6d 70 74 2e 0a 41 6c |shell pr|ompt..Al|
|00002150| 73 6f 2c 20 6e 6f 74 65 | 20 74 68 61 74 20 69 66 |so, note| that if|
|00002160| 20 73 6f 6d 65 20 6f 74 | 68 65 72 20 73 75 62 70 | some ot|her subp|
|00002170| 72 6f 63 65 73 73 20 64 | 65 63 69 64 65 73 20 74 |rocess d|ecides t|
|00002180| 6f 20 64 6f 20 6f 75 74 | 70 75 74 0a 69 6d 6d 65 |o do out|put.imme|
|00002190| 64 69 61 74 65 6c 79 20 | 61 66 74 65 72 20 74 68 |diately |after th|
|000021a0| 65 20 71 75 65 72 79 2c | 20 69 74 73 20 6f 75 74 |e query,| its out|
|000021b0| 70 75 74 20 77 69 6c 6c | 20 62 65 20 74 61 6b 65 |put will| be take|
|000021c0| 6e 20 61 73 20 74 68 65 | 0a 6e 65 77 20 64 69 72 |n as the|.new dir|
|000021d0| 65 63 74 6f 72 79 20 73 | 74 61 63 6b 20 2d 2d 20 |ectory s|tack -- |
|000021e0| 79 6f 75 20 6c 6f 73 65 | 2e 20 49 66 20 74 68 69 |you lose|. If thi|
|000021f0| 73 20 68 61 70 70 65 6e | 73 2c 20 6a 75 73 74 20 |s happen|s, just |
|00002200| 64 6f 20 74 68 65 0a 63 | 6f 6d 6d 61 6e 64 20 61 |do the.c|ommand a|
|00002210| 67 61 69 6e 2e 22 20 6e | 69 6c 5d 29 0a 28 62 79 |gain." n|il]).(by|
|00002220| 74 65 2d 63 6f 64 65 20 | 22 c0 c1 c2 5c 22 88 c0 |te-code |"...\"..|
|00002230| c3 c4 5c 22 87 22 20 5b | 64 65 66 61 6c 69 61 73 |..\"." [|defalias|
|00002240| 20 64 69 72 73 20 73 68 | 65 6c 6c 2d 72 65 73 79 | dirs sh|ell-resy|
|00002250| 6e 63 2d 64 69 72 73 20 | 73 68 65 6c 6c 2d 64 69 |nc-dirs |shell-di|
|00002260| 72 73 74 61 63 6b 2d 6d | 65 73 73 61 67 65 20 23 |rstack-m|essage #|
|00002270| 5b 6e 69 6c 20 22 c0 09 | 5c 6e 42 1b 1c 0b 83 35 |[nil "..|\nB....5|
|00002280| 00 0b 40 1d c6 c7 c8 c9 | ca 21 5c 22 0d 5c 22 83 |..@.....|.!\".\".|
|00002290| 21 00 cb 0d cc 95 cd 4f | 50 15 0d cb 98 83 29 00 |!......O|P.....).|
|000022a0| ce 15 0c 0d cf 51 14 0b | 41 13 29 82 06 00 d0 0c |.....Q..|A.).....|
|000022b0| 21 2a 87 22 20 5b 22 22 | 20 64 65 66 61 75 6c 74 |!*." [""| default|
|000022c0| 2d 64 69 72 65 63 74 6f | 72 79 20 73 68 65 6c 6c |-directo|ry shell|
|000022d0| 2d 64 69 72 73 74 61 63 | 6b 20 64 73 20 6d 73 67 |-dirstac|k ds msg|
|000022e0| 20 64 69 72 20 73 74 72 | 69 6e 67 2d 6d 61 74 63 | dir str|ing-matc|
|000022f0| 68 20 66 6f 72 6d 61 74 | 20 22 5e 25 73 5c 5c 28 |h format| "^%s\\(|
|00002300| 2f 5c 5c 7c 24 5c 5c 29 | 22 20 67 65 74 65 6e 76 |/\\|$\\)|" getenv|
|00002310| 20 22 48 4f 4d 45 22 20 | 22 7e 2f 22 20 30 20 6e | "HOME" |"~/" 0 n|
|00002320| 69 6c 20 22 7e 22 20 22 | 20 22 20 6d 65 73 73 61 |il "~" "| " messa|
|00002330| 67 65 5d 20 35 5d 5d 20 | 33 29 0a 28 64 65 66 76 |ge] 5]] |3).(defv|
|00002340| 61 72 20 73 68 65 6c 6c | 2d 6c 6f 61 64 2d 68 6f |ar shell|-load-ho|
|00002350| 6f 6b 20 6e 69 6c 20 22 | 5c 0a 54 68 69 73 20 68 |ok nil "|\.This h|
|00002360| 6f 6f 6b 20 69 73 20 72 | 75 6e 20 77 68 65 6e 20 |ook is r|un when |
|00002370| 73 68 65 6c 6c 20 69 73 | 20 6c 6f 61 64 65 64 20 |shell is| loaded |
|00002380| 69 6e 2e 0a 54 68 69 73 | 20 69 73 20 61 20 67 6f |in..This| is a go|
|00002390| 6f 64 20 70 6c 61 63 65 | 20 74 6f 20 70 75 74 20 |od place| to put |
|000023a0| 6b 65 79 62 69 6e 64 69 | 6e 67 73 2e 22 29 0a 28 |keybindi|ngs.").(|
|000023b0| 62 79 74 65 2d 63 6f 64 | 65 20 22 c0 c1 21 88 c2 |byte-cod|e "..!..|
|000023c0| c3 21 87 22 20 5b 72 75 | 6e 2d 68 6f 6f 6b 73 20 |.!." [ru|n-hooks |
|000023d0| 73 68 65 6c 6c 2d 6c 6f | 61 64 2d 68 6f 6f 6b 20 |shell-lo|ad-hook |
|000023e0| 70 72 6f 76 69 64 65 20 | 73 68 65 6c 6c 5d 20 32 |provide |shell] 2|
|000023f0| 29 0a | |). | |
+--------+-------------------------+-------------------------+--------+--------+