home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume19 / zsh2.00 / patch02a next >
Text File  |  1991-05-16  |  56KB  |  1,815 lines

  1. Newsgroups: comp.sources.misc
  2. From: Paul Falstad <pfalstad@phoenix.princeton.edu>
  3. Subject:  v19i067:  zsh2.00 - The Z shell, Patch02a/6
  4. Message-ID: <1991May15.214518.6856@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: b0000a78df894269abd0188fa3537090
  6. Date: Wed, 15 May 1991 21:45:18 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: Paul Falstad <pfalstad@phoenix.princeton.edu>
  10. Posting-number: Volume 19, Issue 67
  11. Archive-name: zsh2.00/patch02a
  12. Patch-To: zsh2.00: Volume 18, Issue 84-98
  13.  
  14. This is zsh 2.00.02.  This is part of the README file for patchlevel 02:
  15.  
  16. To get this shell running, cd into the src directory and type
  17. "buildzsh".  I tested it on the following machines, where it compiled
  18. just by running this script:
  19.  
  20. Sun SPARCServer 4/490 running SunOS 4.1.1
  21.  
  22. Past versions have been tested successfully on the following machines:
  23.  
  24. Sun 3/60C running SunOS 4.1.1
  25. NeXTstation running Mach 2.0
  26. SGI-4D/25 running IRIX 3.3.1
  27. hp9000 running BSD 4.3
  28. DECSystem-5000 running ULTRIX 4.0
  29.  
  30. ...
  31.  
  32. 01-02:
  33.    - added script to convert most csh aliases to zsh aliases or functions
  34.    - fc -l (history) now appears in the history itself; HISTNOSTORE
  35.      option added to get old behavior
  36.    - the POSIX process group race has been fixed; so 'w | more' should
  37.      no longer hang
  38.    - FCEDIT added, to match the documentation
  39.    - %{...%} in the prompt added
  40.    - execute-named-cmd and execute-last-named-cmd bindings added
  41.    - sources ~/.zshenv in all shells, even if not interactive, unless
  42.      -f is given
  43.    - ^ and # are no longer `magic' by default; use EXTENDEDGLOB option
  44.      to use them
  45.    - now checks for tty sanity before each command
  46.    - if the right side of a variable assignment expands to more than
  47.      one word, array assignment is assumed; so foo=*.c now works
  48.    - ~foo is no longer expanded in completion
  49.    - select now works even if the argument list is not sorted
  50.    - menucompletebeep option added
  51.    - emacs mode is now 8-bit clean by default; use bindkey -em
  52.      to get your meta key back
  53.    - fc -R, fc -W added
  54.    - nocorrect added
  55.    - lines from history file are now split into words at spaces
  56.    - glob-complete, accept-and-menu-complete,
  57.      beginning-of-line-hist, end-of-line-hist bindings added
  58.    - insert-last-word bound to M-. in emacs mode by default; now moves
  59.      back through the history if run repeatedly
  60.    - J and K now bound to history search in vi mode
  61.    - delete-char no longer core dumps on an empty line
  62.    - menu-complete works better
  63.    - the editor checks the settings of VISUAL and EDITOR to set
  64.      default bindings
  65.    - using [[ ... ]] expressions on a symbolic link works as expected
  66.    - various problems with globbing were fixed
  67.    - xx is now the same as !! if HISTCHARS=x
  68.    - added config.h entry for compilers that don't know about void *
  69.    - lexical analysis made more efficient
  70.    - "if echo $? ; then : ; fi" no longer always prints 0
  71.    - removed all enums, '\x7f's from code
  72.    - in "case foo in bar) xxx ;; esac", foo and bar are no longer subject
  73.      to command alias expansion
  74.    - works on platforms where toupper('A') != 'A'
  75.    - \e sequence added to echo
  76.    - + options now work with set
  77.    - AUTORESUME and AUTOCD work better
  78.    - getopts works better (?)
  79.    - spell checking works better
  80.    - "let 2+3=" no longer crashes the shell
  81.    - "foo=bar; echo ${=foo}" no longer crashes the shell
  82.    - "zsh -c" or "zsh -o" no longer causes a core dump
  83.    - "unset MAIL; echo $MAIL" no longer causes a core dump
  84.    - "(xterm&xterm&)&" no longer causes a core dump
  85.    - "echo $HOM[tab]" beeps instead of deleting "$HOM"
  86.    - incremental history search works better
  87.    - the pwd of a fg'd job is now printed _before_ resuming it
  88.    - rv=`echo -n foo` no longer puts garbage in $rv
  89.    - "=1/*" now works as expected
  90.    - ^Z can now be bound to something
  91.    - the STTY parameter and the builtin builtin are now documented
  92.    - IFS=x; foo=`echo foo` no longer puts a newline in $foo
  93.    - $status added for csh compatibility
  94.    - arrays are automatically expanded if you say 'foo[1234]=x'
  95.    - shell now ignores SIGQUIT (it was commented out before :-)
  96.    - the times builtin works on systems where times() returns > 0
  97.    - no longer hangs the terminal if you ^S before flow control
  98.      is turned off
  99.    - "date ; read foo" now works in interactive shells
  100.    - <<-foo is now parsed as <<- foo, not << -foo
  101.    - fixed various errors in the documentation
  102.  
  103. Stuff that needs to be done
  104.    - port zsh to more places
  105.    - improve vi emulation
  106.  
  107. Known Bugs
  108.    - terminal acts weird under OpenWindows cmdtool
  109.    - xterm run in background inherits bad terminal modes
  110.    - here documents don't appear in the history, and cannot be
  111.      used inside eval statements
  112.  
  113. Paul Falstad  pfalstad@phoenix.princeton.edu
  114. ---
  115. #!/bin/sh
  116. # This is a shell archive (produced by shar 3.49)
  117. # To extract the files from this archive, save it to a file, remove
  118. # everything above the "!/bin/sh" line above, and type "sh file_name".
  119. #
  120. # made 05/11/1991 06:08 UTC by pf@learning
  121. # Source directory /home/learning/pf
  122. #
  123. # existing files WILL be overwritten
  124. #
  125. # This is part 1 of a multipart archive                                    
  126. # do not concatenate these parts, unpack them in order with /bin/sh        
  127. #
  128. # This shar contains:
  129. # length  mode       name
  130. # ------ ---------- ------------------------------------------
  131. # 182334 -rw-r--r-- patches
  132. #   6468 -rw-r--r-- zsh2.00/README
  133. #   1108 -rw-r--r-- zsh2.00/src/funcs.h
  134. #  15255 -rw-r--r-- zsh2.00/src/lex.c
  135. #    281 -rw-r--r-- zsh2.00/src/lex.pro
  136. #   5001 -rw-r--r-- zsh2.00/src/mem.c
  137. #    510 -rw-r--r-- zsh2.00/src/mem.pro
  138. #    619 -rw-r--r-- zsh2.00/src/subst.pro
  139. #    889 -rw-r--r-- zsh2.00/src/table.pro
  140. #   2865 -rw-r--r-- zsh2.00/src/utils.pro
  141. #   1565 -rw-r--r-- zsh2.00/src/y.tab.h
  142. #    624 -rw-r--r-- zsh2.00/src/zle_main.pro
  143. #  18859 -rw-r--r-- zsh2.00/src/zle_tricky.c
  144. #   1282 -rw-r--r-- zsh2.00/src/zle_tricky.pro
  145. #   1137 -rw-r--r-- zsh2.00/scripts/ctoz
  146. #   1429 -rw-r--r-- zsh2.00/src/signals.h.sample
  147. #
  148. if test -r _shar_seq_.tmp; then
  149.     echo 'Must unpack archives in sequence!'
  150.     echo Please unpack part `cat _shar_seq_.tmp` next
  151.     exit 1
  152. fi
  153. # ============= patches ==============
  154. echo 'x - extracting patches (Text)'
  155. sed 's/^X//' << 'SHAR_EOF' > 'patches' &&
  156. *** src/zsh0/zsh2.00/man/man1/zsh.1    Wed Apr 24 00:17:46 1991
  157. --- zsh2.00/man/man1/zsh.1    Fri May 10 07:40:43 1991
  158. ***************
  159. *** 1,5 ****
  160. X  .\"
  161. ! .TH ZSH 1 "1991 April 23"
  162. X  .SH NAME
  163. X  zsh \- the Z shell
  164. X  .SH SYNOPSIS
  165. --- 1,5 ----
  166. X  .\"
  167. ! .TH ZSH 1 "1991 May 5"
  168. X  .SH NAME
  169. X  zsh \- the Z shell
  170. X  .SH SYNOPSIS
  171. ***************
  172. *** 23,28 ****
  173. --- 23,30 ----
  174. X  If preceded by \fBnoglob\fP, filename generation is not performed
  175. X  on any of the words.  If preceded by a \-, the command
  176. X  is executed with a \- prepended to its \fBargv[0]\fP string.
  177. + If preceded by \fBnocorrect\fP, spelling correction is not
  178. + done on any of the words.
  179. X  .PP
  180. X  A \fIpipeline\fP is a sequence of one or more commands
  181. X  separated by \fB|\fP or \fB|&\fP.  \fB|&\fP is shorthand
  182. ***************
  183. *** 190,202 ****
  184. X  See \fBConditional Expressions\fP below for a description
  185. X  of \fIexp\fP.
  186. X  .SH "RESERVED WORDS"
  187. ! The following words are recognized as the first word of a command
  188. X  unless quoted or removed using the \fBunalias\fP builtin:
  189. X  .RS
  190. X  .PP
  191. X  \fBdo done esac then elif else fi for case
  192. X  if while function repeat time until exec command
  193. ! select coproc noglob \-\fP
  194. X  .RE
  195. X  .SH COMMENTS
  196. X  In noninteractive shells, or in interactive shells with the
  197. --- 192,205 ----
  198. X  See \fBConditional Expressions\fP below for a description
  199. X  of \fIexp\fP.
  200. X  .SH "RESERVED WORDS"
  201. ! The following words are recognized as reserved words when used 
  202. ! as the first word of a command
  203. X  unless quoted or removed using the \fBunalias\fP builtin:
  204. X  .RS
  205. X  .PP
  206. X  \fBdo done esac then elif else fi for case
  207. X  if while function repeat time until exec command
  208. ! select coproc noglob \- nocorrect\fP
  209. X  .RE
  210. X  .SH COMMENTS
  211. X  In noninteractive shells, or in interactive shells with the
  212. ***************
  213. *** 227,233 ****
  214. X  to stand for itself) by preceding it with a \e\|.
  215. X  \e followed by a newline is ignored.
  216. X  All characters enclosed between a pair of single quotes ('')
  217. ! are ignored.
  218. X  A single quote cannot appear within single quotes.
  219. X  Inside double quotes (""), parameter and command substitution
  220. X  occurs, and \e quotes the characters \e\|, `, ", and $.
  221. --- 230,236 ----
  222. X  to stand for itself) by preceding it with a \e\|.
  223. X  \e followed by a newline is ignored.
  224. X  All characters enclosed between a pair of single quotes ('')
  225. ! are quoted.
  226. X  A single quote cannot appear within single quotes.
  227. X  Inside double quotes (""), parameter and command substitution
  228. X  occurs, and \e quotes the characters \e\|, `, ", and $.
  229. ***************
  230. *** 453,462 ****
  231. X  may be nested.  Malformed brace expansion expressions,
  232. X  including expressions without a comma, are left unchanged
  233. X  by the shell.
  234. X  .SS Filename Generation
  235. X  If a word contains an unquoted instance of one of the characters
  236. ! #, ^, *, |, <, [, or ?, or the string "..../", it is regarded
  237. X  as a pattern for filename generation, unless the \fBNOGLOB\fP option is set.
  238. X  The word is replaced with a list of sorted filenames that match
  239. X  the pattern.  If no matching pattern is found, the shell gives
  240. X  an error message, unless the \fBNULLGLOB\fP option is set,
  241. --- 456,474 ----
  242. X  may be nested.  Malformed brace expansion expressions,
  243. X  including expressions without a comma, are left unchanged
  244. X  by the shell.
  245. + .PP
  246. + An expression of the form
  247. + \fB{\fIx\fB\-\fIy\fB}\fR,
  248. + where \fIx\fP and \fIy\fP are single characters,
  249. + is expanded to every character between
  250. + \fIx\fP and \fIy\fP, inclusive.
  251. X  .SS Filename Generation
  252. X  If a word contains an unquoted instance of one of the characters
  253. ! *, |, <, [, or ?, or the string "..../", it is regarded
  254. X  as a pattern for filename generation, unless the \fBNOGLOB\fP option is set.
  255. + If the \fBEXTENDED_GLOB\fP option is set, the
  256. + ^ and # characters also denote a pattern; otherwise
  257. + they are not treated specially by the shell.
  258. X  The word is replaced with a list of sorted filenames that match
  259. X  the pattern.  If no matching pattern is found, the shell gives
  260. X  an error message, unless the \fBNULLGLOB\fP option is set,
  261. ***************
  262. *** 498,507 ****
  263. X  matches either x or y.
  264. X  .TP
  265. X  \fBx#\fP
  266. ! matches zero or more occurences of the pattern x.
  267. X  .TP
  268. X  \fBx##\fP
  269. ! matches one or more occurences of the pattern x.
  270. X  .RE
  271. X  .PD
  272. X  .PP
  273. --- 510,519 ----
  274. X  matches either x or y.
  275. X  .TP
  276. X  \fBx#\fP
  277. ! matches zero or more occurrences of the pattern x.
  278. X  .TP
  279. X  \fBx##\fP
  280. ! matches one or more occurrences of the pattern x.
  281. X  .RE
  282. X  .PD
  283. X  .PP
  284. ***************
  285. *** 575,581 ****
  286. X  readable files (0400)
  287. X  .TP
  288. X  .B w
  289. ! writeable files (0200)
  290. X  .TP
  291. X  .B x
  292. X  executable files (0100, same as *)
  293. --- 587,593 ----
  294. X  readable files (0400)
  295. X  .TP
  296. X  .B w
  297. ! writable files (0200)
  298. X  .TP
  299. X  .B x
  300. X  executable files (0100, same as *)
  301. ***************
  302. *** 584,590 ****
  303. X  world-readable files (0004)
  304. X  .TP
  305. X  .B W
  306. ! world-writeable files (0002)
  307. X  .TP
  308. X  .B X
  309. X  world-executable files (0001)
  310. --- 596,602 ----
  311. X  world-readable files (0004)
  312. X  .TP
  313. X  .B W
  314. ! world-writable files (0002)
  315. X  .TP
  316. X  .B X
  317. X  world-executable files (0001)
  318. ***************
  319. *** 626,632 ****
  320. X  *(%W)
  321. X  .RE
  322. X  .PP
  323. ! lists all world-writeable device files in the current directory,
  324. X  and
  325. X  .RS
  326. X  .PP
  327. --- 638,644 ----
  328. X  *(%W)
  329. X  .RE
  330. X  .PP
  331. ! lists all world-writable device files in the current directory,
  332. X  and
  333. X  .RS
  334. X  .PP
  335. ***************
  336. *** 694,700 ****
  337. X  .B NOCLOBBER
  338. X  is set.
  339. X  .TP
  340. ! \fB<<\fP [\-]\fIword\fP
  341. X  The shell input is read up to a line that is the same as
  342. X  .IR word ,
  343. X  or to an end-of-file.
  344. --- 706,712 ----
  345. X  .B NOCLOBBER
  346. X  is set.
  347. X  .TP
  348. ! \fB<<\fP[\-] \fIword\fP
  349. X  The shell input is read up to a line that is the same as
  350. X  .IR word ,
  351. X  or to an end-of-file.
  352. ***************
  353. *** 714,720 ****
  354. X  occurs, \e followed by a newline is removed,
  355. X  and \e must be used to quote the characters
  356. X  \e, $, `, and the first character of \fIword\fP.
  357. ! If \- is prepended to \fIword\fP, then all leading
  358. X  tabs are stripped from \fIword\fP and from the document.
  359. X  .TP
  360. X  .BI <<< word
  361. --- 726,732 ----
  362. X  occurs, \e followed by a newline is removed,
  363. X  and \e must be used to quote the characters
  364. X  \e, $, `, and the first character of \fIword\fP.
  365. ! If <<\- is used, then all leading
  366. X  tabs are stripped from \fIword\fP and from the document.
  367. X  .TP
  368. X  .BI <<< word
  369. ***************
  370. *** 886,899 ****
  371. X  is executed after the function completes in the environment
  372. X  of the caller.
  373. X  .PP
  374. ! The builtin
  375. X  .B return
  376. ! is used to return
  377. X  from function calls.
  378. X  .PP
  379. X  Function identifiers
  380. X  can be listed with the
  381. ! .B function
  382. X  builtin.
  383. X  Functions can be undefined with the
  384. X  .B unfunction
  385. --- 898,911 ----
  386. X  is executed after the function completes in the environment
  387. X  of the caller.
  388. X  .PP
  389. ! The
  390. X  .B return
  391. ! builtin is used to return
  392. X  from function calls.
  393. X  .PP
  394. X  Function identifiers
  395. X  can be listed with the
  396. ! .B functions
  397. X  builtin.
  398. X  Functions can be undefined with the
  399. X  .B unfunction
  400. ***************
  401. *** 1036,1042 ****
  402. X  inherited by the shell from its parent
  403. X  (but see the \fBTRAPxxx\fP special function above).
  404. X  .SH "ZSH LINE EDITOR"
  405. ! If the \fBUSE_ZLE\fP option is set (it is by default)
  406. X  and the shell input is attached to the terminal, the user
  407. X  is allowed to edit command lines.
  408. X  .PP
  409. --- 1048,1054 ----
  410. X  inherited by the shell from its parent
  411. X  (but see the \fBTRAPxxx\fP special function above).
  412. X  .SH "ZSH LINE EDITOR"
  413. ! If the \fBZLE\fP option is set (it is by default)
  414. X  and the shell input is attached to the terminal, the user
  415. X  is allowed to edit command lines.
  416. X  .PP
  417. ***************
  418. *** 1050,1059 ****
  419. X  .SS Bindings
  420. X  Command bindings may be set using the \fBbindkey\fP builtin.
  421. X  There are two keymaps\-the main keymap and the alternate keymap.
  422. - The main keymap is bound to emacs mode by default.
  423. X  The alternate keymap is bound to vi command mode.
  424. X  To bind the main keymap to vi insert mode, use 
  425. ! \fBbindkey \-v\fP.
  426. X  .PP
  427. X  The following is a list of all the key commands
  428. X  and their default bindings in emacs and vi command mode.
  429. --- 1062,1072 ----
  430. X  .SS Bindings
  431. X  Command bindings may be set using the \fBbindkey\fP builtin.
  432. X  There are two keymaps\-the main keymap and the alternate keymap.
  433. X  The alternate keymap is bound to vi command mode.
  434. + The main keymap is bound to emacs mode by default.
  435. X  To bind the main keymap to vi insert mode, use 
  436. ! \fBbindkey \-v\fP, or set one of the \fBVISUAL\fP or \fBEDITOR\fP
  437. ! environment variables to a string containing \fBvi\fP.
  438. X  .PP
  439. X  The following is a list of all the key commands
  440. X  and their default bindings in emacs and vi command mode.
  441. ***************
  442. *** 1117,1122 ****
  443. --- 1130,1139 ----
  444. X  Move to the beginning of the buffer, or if already there,
  445. X  move to the first event in the history list.
  446. X  .TP
  447. + \fBbeginning-of-line-hist\fP
  448. + Move to the beginning of the line.  If already at the
  449. + beginning of the buffer, move to the previous history line.
  450. + .TP
  451. X  \fBbeginning-of-history\fP
  452. X  Move to the first event in the history list.
  453. X  .TP
  454. ***************
  455. *** 1130,1135 ****
  456. --- 1147,1156 ----
  457. X  Move to the end of the buffer, or if already there,
  458. X  move to the last event in the history list.
  459. X  .TP
  460. + \fBend-of-line-hist\fP
  461. + Move to the end of the line.  If already at the end of
  462. + the buffer, move to the next history line.
  463. + .TP
  464. X  \fBend-of-history\fP
  465. X  Move to the last event in the history list.
  466. X  .TP
  467. ***************
  468. *** 1146,1152 ****
  469. X  The string may begin with `^' to anchor the search to the
  470. X  beginning of the line.
  471. X  .TP
  472. ! \fBhistory-search-backward\fP (M-P M-p)
  473. X  Search backward in the history for a line beginning with the first
  474. X  word in the buffer.
  475. X  .TP
  476. --- 1167,1173 ----
  477. X  The string may begin with `^' to anchor the search to the
  478. X  beginning of the line.
  479. X  .TP
  480. ! \fBhistory-search-backward\fP (M-P M-p) (K)
  481. X  Search backward in the history for a line beginning with the first
  482. X  word in the buffer.
  483. X  .TP
  484. ***************
  485. *** 1155,1161 ****
  486. X  The string may begin with `^' to anchor the search to the
  487. X  beginning of the line.
  488. X  .TP
  489. ! \fBhistory-search-forward\fP (M-N M-n)
  490. X  Search forward in the history for a line beginning with the first
  491. X  word in the buffer.
  492. X  .TP
  493. --- 1176,1182 ----
  494. X  The string may begin with `^' to anchor the search to the
  495. X  beginning of the line.
  496. X  .TP
  497. ! \fBhistory-search-forward\fP (M-N M-n) (J)
  498. X  Search forward in the history for a line beginning with the first
  499. X  word in the buffer.
  500. X  .TP
  501. ***************
  502. *** 1168,1174 ****
  503. X  Search in the history list for a line matching the current one and
  504. X  fetch the event following it.
  505. X  .TP
  506. ! \fBinsert-last-word\fP (M-_)
  507. X  Insert the last word from the previous history event at the
  508. X  cursor position.
  509. X  .TP
  510. --- 1189,1195 ----
  511. X  Search in the history list for a line matching the current one and
  512. X  fetch the event following it.
  513. X  .TP
  514. ! \fBinsert-last-word\fP (M-_ M-.)
  515. X  Insert the last word from the previous history event at the
  516. X  cursor position.
  517. X  .TP
  518. ***************
  519. *** 1281,1287 ****
  520. X  Read a movement command from the keyboard, and swap
  521. X  the case of all characters
  522. X  from the cursor position to the endpoint of the movement.
  523. ! If the command is \fBvi-oper-swap-case\fP,
  524. X  swap the case of all characters on the current line.
  525. X  .TP
  526. X  \fBoverwrite-mode\fP (^X^O)
  527. --- 1302,1308 ----
  528. X  Read a movement command from the keyboard, and swap
  529. X  the case of all characters
  530. X  from the cursor position to the endpoint of the movement.
  531. ! If the movement command is \fBvi-oper-swap-case\fP,
  532. X  swap the case of all characters on the current line.
  533. X  .TP
  534. X  \fBoverwrite-mode\fP (^X^O)
  535. ***************
  536. *** 1356,1361 ****
  537. --- 1377,1386 ----
  538. X  Multiply the argument of the next command by 4.
  539. X  .SS Completion
  540. X  .TP
  541. + \fBaccept-or-menu-complete\fP
  542. + In a menu completion, insert the current completion into the buffer,
  543. + and advance to the next possible completion.
  544. + .TP
  545. X  \fBcomplete-word\fP (unbound) (\|\e\|)
  546. X  Attempt completion on the current word.
  547. X  .TP
  548. ***************
  549. *** 1364,1370 ****
  550. X  is at the end of the line, list possible completions for the
  551. X  current word.
  552. X  .TP
  553. ! \fBexpand-or-complete\fP (TAB) (^X)
  554. X  Attempt shell expansion on the current word.
  555. X  If that fails,
  556. X  attempt completion.
  557. --- 1389,1401 ----
  558. X  is at the end of the line, list possible completions for the
  559. X  current word.
  560. X  .TP
  561. ! \fBexecute-named-cmd\fP (M-x)
  562. ! Read the name of a editor command and execute it.
  563. ! .TP
  564. ! \fBexecute-last-named-cmd\fP (M-z)
  565. ! Redo the last function executed with \fBexecute-named-cmd\fP.
  566. ! .TP
  567. ! \fBexpand-or-complete\fP (TAB) (TAB ^X)
  568. X  Attempt shell expansion on the current word.
  569. X  If that fails,
  570. X  attempt completion.
  571. ***************
  572. *** 2070,2076 ****
  573. X  Individual elements of an array may be selected using a 
  574. X  subscript.  A subscript of the form \fB[\fIexp\fB]\fR
  575. X  selects the single element \fIexp\fP, where \fIexp\fP is
  576. ! an arithmetic expression.
  577. X  A subscript of the form \fB[*]\fP evaluates to all
  578. X  elements of an array.
  579. X  A subscript of the form \fB[\fIexp1\fP,\fIexp2\fB]\fR
  580. --- 2101,2108 ----
  581. X  Individual elements of an array may be selected using a 
  582. X  subscript.  A subscript of the form \fB[\fIexp\fB]\fR
  583. X  selects the single element \fIexp\fP, where \fIexp\fP is
  584. ! an arithmetic expression.  The elements are numbered
  585. ! beginning with 1.
  586. X  A subscript of the form \fB[*]\fP evaluates to all
  587. X  elements of an array.
  588. X  A subscript of the form \fB[\fIexp1\fP,\fIexp2\fB]\fR
  589. ***************
  590. *** 2088,2096 ****
  591. X  by the \fBset\fP builtin, or by direct assignment.
  592. X  The parameter \fIn\fP, where \fIn\fP is a number,
  593. X  is the \fIn\fPth positional parameter.
  594. ! The parameters \fB*\fP, \fB@\fP, and \fBargc\fP are
  595. X  arrays containing all the positional parameters;
  596. ! thus \fBargc\fP[\fIn\fP], etc. is equivalent to simply \fIn\fP.
  597. X  .SS Special Parameters
  598. X  The following parameters are automatically set by the shell:
  599. X  .PP
  600. --- 2120,2128 ----
  601. X  by the \fBset\fP builtin, or by direct assignment.
  602. X  The parameter \fIn\fP, where \fIn\fP is a number,
  603. X  is the \fIn\fPth positional parameter.
  604. ! The parameters \fB*\fP, \fB@\fP, and \fBargv\fP are
  605. X  arrays containing all the positional parameters;
  606. ! thus \fBargv\fP[\fIn\fP], etc. is equivalent to simply \fIn\fP.
  607. X  .SS Special Parameters
  608. X  The following parameters are automatically set by the shell:
  609. X  .PP
  610. ***************
  611. *** 2125,2134 ****
  612. X  .B ?
  613. X  The exit value returned by the last command.
  614. X  .TP
  615. X  .B _
  616. ! Initially, the absolute pathname of the shell or script
  617. ! being executed as passed in the environment.
  618. ! Subsequently, the last argument of the previous command.
  619. X  .TP
  620. X  .B ERRNO
  621. X  The value of errno as set by the most recently failed system call.
  622. --- 2157,2169 ----
  623. X  .B ?
  624. X  The exit value returned by the last command.
  625. X  .TP
  626. + .B status
  627. + Same as \fB?\fP.
  628. + .TP
  629. X  .B _
  630. ! The last argument of the previous command.
  631. ! Also, this parameter is set in the environment of every command
  632. ! executed to the full pathname of the command.
  633. X  .TP
  634. X  .B ERRNO
  635. X  The value of errno as set by the most recently failed system call.
  636. ***************
  637. *** 2229,2234 ****
  638. --- 2264,2272 ----
  639. X  stack gets larger than this, it will be truncated automatically.
  640. X  This is useful with the \fBAUTO_PUSHD\fP option.
  641. X  .TP
  642. + .B FCEDIT
  643. + The default editor for the \fBfc\fP builtin.
  644. + .TP
  645. X  .B fignore (FIGNORE)
  646. X  An array (colon separated list)
  647. X  containing the suffixes of files to be ignored
  648. ***************
  649. *** 2375,2380 ****
  650. --- 2413,2423 ----
  651. X  .TP
  652. X  .B %#
  653. X  A '#' if the shell is running as root, a '%' if not.
  654. + .TP
  655. + \fB%{\fP...\fB%}\fP
  656. + Include a string as a literal escape sequence.
  657. + The string within the braces should not change the cursor
  658. + position.
  659. X  .RE
  660. X  .PD
  661. X  .PP
  662. ***************
  663. *** 2419,2424 ****
  664. --- 2462,2472 ----
  665. X  .B SAVEHIST
  666. X  The maximum number of history events to save in the history file.
  667. X  .TP
  668. + .B STTY
  669. + If this parameter is set in a command's environment, the shell
  670. + runs the \fBstty\fP command with the value of this parameter as arguments
  671. + in order to set up the terminal before executing the command.
  672. + .TP
  673. X  .B TIMEFMT
  674. X  The format of process time reports with the \fBtime\fP keyword.
  675. X  The default is "%E real  %U user  %S system  %P".
  676. ***************
  677. *** 2570,2770 ****
  678. X  .RS
  679. X  .PD 0
  680. X  .TP
  681. ! \-\fBa\fP (\fBALLEXPORT\fP)
  682. X  All parameters subsequently defined are automatically exported.
  683. X  .TP
  684. ! \-\fBe\fP (\fBERREXIT\fP)
  685. X  If a command has a non-zero exit status, execute the \fBERR\fP
  686. X  trap, if set, and exit.
  687. X  .TP
  688. ! \-\fBf\fP (\fBNO_RCS\fP)
  689. ! Do not source the .zshrc, .zlogin, or .zlogout files.
  690. X  .TP
  691. ! \-\fBg\fP (\fBHIST_IGNORE_SPACE\fP)
  692. ! Do not enter command lines into the history list
  693. ! if they begin with a blank.
  694. X  .TP
  695. ! \-\fBh\fP (\fBHIST_IGNORE_DUPS\fP)
  696. X  Do not enter command lines into the history list
  697. X  if they are duplicates of the previous event.
  698. X  .TP
  699. ! \-\fBi\fP (\fBINTERACTIVE\fP)
  700. ! This is an interactive shell.
  701. X  .TP
  702. ! \-\fBj\fP (\fBHISTLIT\fP)
  703. X  Use literal (unparsed) versions of the history lines
  704. X  in the editor.
  705. X  .TP
  706. ! \-\fBk\fP (\fBINTERACTIVE_COMMENTS\fP)
  707. X  Allow comments even in interactive shells.
  708. X  .TP
  709. ! \-\fBl\fP (\fBLOGIN\fP)
  710. X  This is a login shell.
  711. X  .TP
  712. ! \-\fBm\fP (\fBMONITOR\fP)
  713. ! Allow job control.  Set by default in interactive shells.
  714. X  .TP
  715. ! \-\fBn\fP (\fBNOEXEC\fP)
  716. ! Read commands and check them for syntax errors, but do not execute them.
  717. X  .TP
  718. ! \-\fBs\fP (\fBSHINSTDIN\fP)
  719. ! Read commands from the standard input.
  720. X  .TP
  721. ! \-\fBu\fP (\fBNOUNSET\fP)
  722. ! Treat unset parameters as an error when substituting.
  723. X  .TP
  724. ! \-\fBv\fP (\fBVERBOSE\fP)
  725. ! Print shell input lines as they are read.
  726. X  .TP
  727. ! \-\fBw\fP (\fBCHASELINKS\fP)
  728. ! Resolve symbolic links to their true values.
  729. X  .TP
  730. ! \-\fBx\fP (\fBXTRACE\fP)
  731. ! Print commands and their arguments as they are executed.
  732. X  .TP
  733. ! \-\fBy\fP (\fBSH_WORD_SPLIT\fP)
  734. ! See \fIParameter Expansion\fP.
  735. X  .TP
  736. ! \-\fB1\fP (\fBNO_CLOBBER\fP)
  737. X  Prevents \fB>\fP redirection from truncating existing files.
  738. X  \fB>!\fP may be used to truncate a file instead.
  739. X  Also prevents \fB>>\fP from creating files.
  740. X  \fB>>!\fP may be used instead.
  741. X  .TP
  742. ! \-\fB2\fP (\fBNO_BAD_PATTERN\fP)
  743. ! If a pattern for filename generation is badly formed,
  744. ! leave it unchanged in the argument list instead of
  745. ! printing an error.
  746. X  .TP
  747. ! \-\fB3\fP (\fBNO_NOMATCH\fP)
  748. X  If a pattern for filename generation has no matches,
  749. X  leave it unchanged in the argument list instead of
  750. X  printing an error.
  751. X  .TP
  752. ! \-\fB4\fP (\fBGLOB_DOTS\fP)
  753. ! Do not require a leading . in a filename to be matched explicitly.
  754. X  .TP
  755. ! \-\fB5\fP (\fBNOTIFY\fP)
  756. X  Report the status of background jobs immediately, rather than
  757. X  waiting until just before printing a prompt.
  758. X  .TP
  759. ! \-\fB6\fP (\fBBGNICE\fP)
  760. ! Run all background jobs at a lower priority.  This option
  761. ! is set by default.
  762. X  .TP
  763. ! \-\fB7\fP (\fBIGNOREEOF\fP)
  764. ! Do not exit on end-of-file.  Require the use
  765. ! of \fBexit\fP or \fBlogout\fP instead.
  766. X  .TP
  767. ! \-\fB8\fP (\fBMARKDIRS\fP)
  768. ! Append a trailing / to all directory
  769. ! names resulting from filename generation.
  770. X  .TP
  771. ! \-\fB9\fP (\fBAUTOLIST\fP)
  772. ! Automatically list choices on an ambiguous completion.
  773. ! .TP
  774. ! \-\fB0\fP (\fBCORRECT\fP)
  775. ! Try to correct the spelling of commands.
  776. ! .TP
  777. ! \-\fBB\fP (\fBNOBEEP\fP)
  778. ! Do not beep.
  779. ! .TP
  780. ! \-\fBC\fP (\fBPRINT_EXIT_VALUE\fP)
  781. X  Print the exit value of programs with non-zero exit status.
  782. X  .TP
  783. ! \-\fBD\fP (\fBPUSHD_TO_HOME\fP)
  784. ! Have \fBpushd\fP with no arguments act like
  785. ! \fBpushd\fP $HOME.
  786. ! .TP
  787. ! \-\fBE\fP (\fBPUSHD_SILENT\fP)
  788. X  Do not print the directory stack after \fBpushd\fP
  789. X  or \fBpopd\fP.
  790. X  .TP
  791. ! \-\fBF\fP (\fBNOGLOB\fP)
  792. ! Disable filename generation.
  793. X  .TP
  794. ! \-\fBG\fP (\fBNULLGLOB\fP)
  795. ! If a pattern for filename generation has no matches,
  796. ! delete the pattern from the argument list instead
  797. ! of reporting an error.  Overrides \fBNONOMATCH\fP.
  798. X  .TP
  799. ! \-\fBH\fP (\fBRMSTARSILENT\fP)
  800. X  Do not query the user before executing "rm *".
  801. X  .TP
  802. ! \-\fBI\fP (\fBIGNORE_BRACES\fP)
  803. ! Do not perform brace expansion.
  804. X  .TP
  805. ! \-\fBJ\fP (\fBAUTO_CD\fP)
  806. ! If a command is not in the hash table, and there exists an
  807. ! executable directory by that name, perform the \fBcd\fP
  808. ! command to that directory.
  809. X  .TP
  810. ! \-\fBK\fP (\fBNO_BANG_HIST\fP)
  811. ! Do not perform textual history substitution.  Do not
  812. ! treat the ! character specially.
  813. X  .TP
  814. ! \-\fBL\fP (\fBSUN_KEYBOARD_HACK\fP)
  815. X  If a line ends with a backquote, and there are an odd number
  816. X  of backquotes on the line, ignore the trailing backquote.
  817. X  This is useful on some keyboards where the return key is
  818. X  too small, and the backquote key lies annoyingly close to it.
  819. X  .TP
  820. ! \-\fBM\fP (\fBSINGLE_LINE_ZLE\fP)
  821. ! Use single-line command line editing instead of multi-line.
  822. X  .TP
  823. ! \-\fBN\fP (\fBAUTO_PUSHD\fP)
  824. ! Make \fBcd\fP act like \fBpushd\fP.
  825. X  .TP
  826. ! \-\fBO\fP (\fBCORRECT_ALL\fP)
  827. ! Try to correct the spelling of all arguments in a line.
  828. ! .TP
  829. ! \-\fBP\fP (\fBRC_EXPAND_PARAM\fP)
  830. ! See \fIParameter Expansion\fP.
  831. ! .TP
  832. ! \-\fBQ\fP (\fBPATH_DIRS\fP)
  833. ! Perform a path search even on command names with slahses in them.
  834. ! Thus if "/usr/local/bin" is in the user's path, and he types
  835. ! "X11/xinit", the command "/usr/local/bin/X11/xinit" will be executed
  836. ! (assuming it exists).
  837. ! .TP
  838. ! \-\fBR\fP (\fBLONG_LIST_JOBS\fP)
  839. ! List jobs in the long format by default.
  840. ! .TP
  841. ! \-\fBS\fP (\fBRECEXACT\fP)
  842. ! In completion, recognize exact matches even
  843. ! if they are ambiguous.
  844. ! .TP
  845. ! \-\fBT\fP (\fBCDABLEVARS\fP)
  846. ! If the argument to a \fBcd\fP command is not a directory,
  847. ! but a parameter exists by the same name whose value
  848. ! begins with a /, try to change to the directory
  849. ! specified by the parameter's value.
  850. ! .TP
  851. ! \-\fBU\fP (\fBMAIL_WARNING\fP)
  852. ! Print a warning message if a mail file has been
  853. ! accessed since the shell last checked.
  854. ! .TP
  855. ! \-\fBV\fP (\fBNO_PROMPT_CLOBBER\fP)
  856. ! Don't print a carriage return just before printing
  857. ! a prompt in the line editor.
  858. ! .TP
  859. ! \-\fBW\fP (\fBAUTO_RESUME\fP)
  860. ! Treat single word simple commands without redirection
  861. ! as candidates for resumption of an existing job.
  862. ! .TP
  863. ! \-\fBX\fP (\fBLIST_TYPES\fP)
  864. ! When listing files possible completions, show the
  865. ! type of each file with a trailing identifying mark.
  866. ! .TP
  867. ! \-\fBY\fP (\fBMENU_COMPLETE\fP)
  868. ! On an ambiguous completion, instead of listing possibilities,
  869. ! insert the first match.  Then when completion is requested
  870. ! again, remove the first match and insert the second match, etc.
  871. ! When there are no more matches, go back to the first one again.
  872. ! \fBreverse-menu-complete\fP may be used to loop through the list
  873. ! in the other direction.
  874. ! .TP
  875. ! \-\fBZ\fP (\fBUSE_ZLE\fP)
  876. X  Use the zsh line editor.
  877. X  .RE
  878. X  .PD
  879. --- 2618,2835 ----
  880. X  .RS
  881. X  .PD 0
  882. X  .TP
  883. ! \fBALLEXPORT\fP (\-\fBa\fP)
  884. X  All parameters subsequently defined are automatically exported.
  885. X  .TP
  886. ! \fBAUTO_CD\fP (\-\fBJ\fP)
  887. ! If a command is not in the hash table, and there exists an
  888. ! executable directory by that name, perform the \fBcd\fP
  889. ! command to that directory.
  890. ! .TP
  891. ! \fBAUTOLIST\fP (\-\fB9\fP)
  892. ! Automatically list choices on an ambiguous completion.
  893. ! .TP
  894. ! \fBAUTO_PUSHD\fP (\-\fBN\fP)
  895. ! Make \fBcd\fP act like \fBpushd\fP.
  896. ! .TP
  897. ! \fBAUTO_RESUME\fP (\-\fBW\fP)
  898. ! Treat single word simple commands without redirection
  899. ! as candidates for resumption of an existing job.
  900. ! .TP
  901. ! \fBBGNICE\fP (\-\fB6\fP)
  902. ! Run all background jobs at a lower priority.  This option
  903. ! is set by default.
  904. ! .TP
  905. ! \fBCDABLEVARS\fP (\-\fBT\fP)
  906. ! If the argument to a \fBcd\fP command is not a directory,
  907. ! but a parameter exists by the same name whose value
  908. ! begins with a /, try to change to the directory
  909. ! specified by the parameter's value.
  910. ! .TP
  911. ! \fBCHASELINKS\fP (\-\fBw\fP)
  912. ! Resolve symbolic links to their true values.
  913. ! .TP
  914. ! \fBCORRECT\fP (\-\fB0\fP)
  915. ! Try to correct the spelling of commands.
  916. ! .TP
  917. ! \fBCORRECT_ALL\fP (\-\fBO\fP)
  918. ! Try to correct the spelling of all arguments in a line.
  919. ! .TP
  920. ! \fBERREXIT\fP (\-\fBe\fP)
  921. X  If a command has a non-zero exit status, execute the \fBERR\fP
  922. X  trap, if set, and exit.
  923. X  .TP
  924. ! \fBEXTENDED_GLOB\fP
  925. ! Treat the # and ^ characters as part of patterns for filename
  926. ! generation, etc.
  927. X  .TP
  928. ! \fBGLOB_COMPLETE\fP
  929. ! Like \fBMENU_COMPLETE\fP, except that the current word
  930. ! is expanded using normal shell expansion instead of completion.
  931. ! If no matches are found, a * is added to the end of the word, and expansion
  932. ! is attempted again.
  933. X  .TP
  934. ! \fBGLOB_DOTS\fP (\-\fB4\fP)
  935. ! Do not require a leading . in a filename to be matched explicitly.
  936. ! .TP
  937. ! \fBHIST_IGNORE_DUPS\fP (\-\fBh\fP)
  938. X  Do not enter command lines into the history list
  939. X  if they are duplicates of the previous event.
  940. X  .TP
  941. ! \fBHIST_IGNORE_SPACE\fP (\-\fBg\fP)
  942. ! Do not enter command lines into the history list
  943. ! if they begin with a blank.
  944. X  .TP
  945. ! \fBHISTLIT\fP (\-\fBj\fP)
  946. X  Use literal (unparsed) versions of the history lines
  947. X  in the editor.
  948. X  .TP
  949. ! \fBHIST_NO_STORE\fP
  950. ! Remove the \fBhistory\fP (\fBfc\fP \-\fBl\fP) command from
  951. ! the history when invoked.
  952. ! .TP
  953. ! \fBIGNORE_BRACES\fP (\-\fBI\fP)
  954. ! Do not perform brace expansion.
  955. ! .TP
  956. ! \fBIGNOREEOF\fP (\-\fB7\fP)
  957. ! Do not exit on end-of-file.  Require the use
  958. ! of \fBexit\fP or \fBlogout\fP instead.
  959. ! .TP
  960. ! \fBINTERACTIVE\fP (\-\fBi\fP)
  961. ! This is an interactive shell.
  962. ! .TP
  963. ! \fBINTERACTIVE_COMMENTS\fP (\-\fBk\fP)
  964. X  Allow comments even in interactive shells.
  965. X  .TP
  966. ! \fBLIST_TYPES\fP (\-\fBX\fP)
  967. ! When listing files possible completions, show the
  968. ! type of each file with a trailing identifying mark.
  969. ! .TP
  970. ! \fBLOGIN\fP (\-\fBl\fP)
  971. X  This is a login shell.
  972. X  .TP
  973. ! \fBLONG_LIST_JOBS\fP (\-\fBR\fP)
  974. ! List jobs in the long format by default.
  975. X  .TP
  976. ! \fBMAIL_WARNING\fP (\-\fBU\fP)
  977. ! Print a warning message if a mail file has been
  978. ! accessed since the shell last checked.
  979. X  .TP
  980. ! \fBMARKDIRS\fP (\-\fB8\fP)
  981. ! Append a trailing / to all directory
  982. ! names resulting from filename generation.
  983. X  .TP
  984. ! \fBMENU_COMPLETE\fP (\-\fBY\fP)
  985. ! On an ambiguous completion, instead of listing possibilities,
  986. ! insert the first match.  Then when completion is requested
  987. ! again, remove the first match and insert the second match, etc.
  988. ! When there are no more matches, go back to the first one again.
  989. ! \fBreverse-menu-complete\fP may be used to loop through the list
  990. ! in the other direction.
  991. X  .TP
  992. ! \fBMENU_COMPLETE_BEEP\fP
  993. ! Beep on an ambiguous menu completion.
  994. X  .TP
  995. ! \fBMONITOR\fP (\-\fBm\fP)
  996. ! Allow job control.  Set by default in interactive shells.
  997. X  .TP
  998. ! \fBNO_BAD_PATTERN\fP (\-\fB2\fP)
  999. ! If a pattern for filename generation is badly formed,
  1000. ! leave it unchanged in the argument list instead of
  1001. ! printing an error.
  1002. X  .TP
  1003. ! \fBNO_BANG_HIST\fP (\-\fBK\fP)
  1004. ! Do not perform textual history substitution.  Do not
  1005. ! treat the ! character specially.
  1006. X  .TP
  1007. ! \fBNOBEEP\fP (\-\fBB\fP)
  1008. ! Do not beep.
  1009. ! .TP
  1010. ! \fBNO_CLOBBER\fP (\-\fB1\fP)
  1011. X  Prevents \fB>\fP redirection from truncating existing files.
  1012. X  \fB>!\fP may be used to truncate a file instead.
  1013. X  Also prevents \fB>>\fP from creating files.
  1014. X  \fB>>!\fP may be used instead.
  1015. X  .TP
  1016. ! \fBNOEXEC\fP (\-\fBn\fP)
  1017. ! Read commands and check them for syntax errors, but do not execute them.
  1018. X  .TP
  1019. ! \fBNOGLOB\fP (\-\fBF\fP)
  1020. ! Disable filename generation.
  1021. ! .TP
  1022. ! \fBNO_NOMATCH\fP (\-\fB3\fP)
  1023. X  If a pattern for filename generation has no matches,
  1024. X  leave it unchanged in the argument list instead of
  1025. X  printing an error.
  1026. X  .TP
  1027. ! \fBNO_PROMPT_CLOBBER\fP (\-\fBV\fP)
  1028. ! Don't print a carriage return just before printing
  1029. ! a prompt in the line editor.
  1030. X  .TP
  1031. ! \fBNO_RCS\fP (\-\fBf\fP)
  1032. ! Do not source the .zshenv, .zshrc, .zlogin, or .zlogout files.
  1033. ! .TP
  1034. ! \fBNOTIFY\fP (\-\fB5\fP)
  1035. X  Report the status of background jobs immediately, rather than
  1036. X  waiting until just before printing a prompt.
  1037. X  .TP
  1038. ! \fBNOUNSET\fP (\-\fBu\fP)
  1039. ! Treat unset parameters as an error when substituting.
  1040. X  .TP
  1041. ! \fBNULLGLOB\fP (\-\fBG\fP)
  1042. ! If a pattern for filename generation has no matches,
  1043. ! delete the pattern from the argument list instead
  1044. ! of reporting an error.  Overrides \fBNONOMATCH\fP.
  1045. X  .TP
  1046. ! \fBPATH_DIRS\fP (\-\fBQ\fP)
  1047. ! Perform a path search even on command names with slashes in them.
  1048. ! Thus if "/usr/local/bin" is in the user's path, and he types
  1049. ! "X11/xinit", the command "/usr/local/bin/X11/xinit" will be executed
  1050. ! (assuming it exists).
  1051. X  .TP
  1052. ! \fBPRINT_EXIT_VALUE\fP (\-\fBC\fP)
  1053. X  Print the exit value of programs with non-zero exit status.
  1054. X  .TP
  1055. ! \fBPUSHD_SILENT\fP (\-\fBE\fP)
  1056. X  Do not print the directory stack after \fBpushd\fP
  1057. X  or \fBpopd\fP.
  1058. X  .TP
  1059. ! \fBPUSHD_TO_HOME\fP (\-\fBD\fP)
  1060. ! Have \fBpushd\fP with no arguments act like
  1061. ! \fBpushd\fP $HOME.
  1062. X  .TP
  1063. ! \fBRC_EXPAND_PARAM\fP (\-\fBP\fP)
  1064. ! See \fIParameter Expansion\fP.
  1065. X  .TP
  1066. ! \fBRECEXACT\fP (\-\fBS\fP)
  1067. ! In completion, recognize exact matches even
  1068. ! if they are ambiguous.
  1069. ! .TP
  1070. ! \fBRMSTARSILENT\fP (\-\fBH\fP)
  1071. X  Do not query the user before executing "rm *".
  1072. X  .TP
  1073. ! \fBSHINSTDIN\fP (\-\fBs\fP)
  1074. ! Read commands from the standard input.
  1075. X  .TP
  1076. ! \fBSH_WORD_SPLIT\fP (\-\fBy\fP)
  1077. ! See \fIParameter Expansion\fP.
  1078. X  .TP
  1079. ! \fBSINGLE_LINE_ZLE\fP (\-\fBM\fP)
  1080. ! Use single-line command line editing instead of multi-line.
  1081. X  .TP
  1082. ! \fBSUN_KEYBOARD_HACK\fP (\-\fBL\fP)
  1083. X  If a line ends with a backquote, and there are an odd number
  1084. X  of backquotes on the line, ignore the trailing backquote.
  1085. X  This is useful on some keyboards where the return key is
  1086. X  too small, and the backquote key lies annoyingly close to it.
  1087. X  .TP
  1088. ! \fBVERBOSE\fP (\-\fBv\fP)
  1089. ! Print shell input lines as they are read.
  1090. X  .TP
  1091. ! \fBXTRACE\fP (\-\fBx\fP)
  1092. ! Print commands and their arguments as they are executed.
  1093. X  .TP
  1094. ! \fBZLE\fP (\-\fBZ\fP)
  1095. X  Use the zsh line editor.
  1096. X  .RE
  1097. X  .PD
  1098. ***************
  1099. *** 2813,2819 ****
  1100. X  or the current job if none is specified.
  1101. X  .TP
  1102. X  .PD 0
  1103. ! \fBbindkey\fP \-\fBevd
  1104. X  .TP
  1105. X  \fBbindkey\fP \-\fBr\fP \fIin-string\fP ...
  1106. X  .TP
  1107. --- 2878,2884 ----
  1108. X  or the current job if none is specified.
  1109. X  .TP
  1110. X  .PD 0
  1111. ! \fBbindkey\fP \-\fBmevd
  1112. X  .TP
  1113. X  \fBbindkey\fP \-\fBr\fP \fIin-string\fP ...
  1114. X  .TP
  1115. ***************
  1116. *** 2823,2829 ****
  1117. X  .PD
  1118. X  If one of the \-\fBe\fP, \-\fBv\fP, or \-\fBd\fP options is given,
  1119. X  reset the keymaps for emacs mode, vi mode, or the default mode,
  1120. ! respectively.
  1121. X  If the \-\fBr\fP option is given, remove any binding for each \fIin-string\fP.
  1122. X  If the \-\fBs\fP option is not specified, bind each \fIin-string\fP
  1123. X  to a specified \fIcommand\fP.  If no \fIcommand\fP is specified,
  1124. --- 2888,2895 ----
  1125. X  .PD
  1126. X  If one of the \-\fBe\fP, \-\fBv\fP, or \-\fBd\fP options is given,
  1127. X  reset the keymaps for emacs mode, vi mode, or the default mode,
  1128. ! respectively; if the \-\fBm\fP option is also given,
  1129. ! allow the use of a meta key.
  1130. X  If the \-\fBr\fP option is given, remove any binding for each \fIin-string\fP.
  1131. X  If the \-\fBs\fP option is not specified, bind each \fIin-string\fP
  1132. X  to a specified \fIcommand\fP.  If no \fIcommand\fP is specified,
  1133. ***************
  1134. *** 2885,2890 ****
  1135. --- 2951,2959 ----
  1136. X  \fBuntil\fP, \fBselect\fP, or \fBrepeat\fP loop.  If \fIn\fP
  1137. X  is specified, then break \fIn\fP levels instead of just one.
  1138. X  .TP
  1139. + \fBbuiltin\fP \fIname\fP [ \fIargs\fP ] ...
  1140. + Executes the builtin \fIname\fP, with the given \fIargs\fP.
  1141. + .TP
  1142. X  \fBbye\fP
  1143. X  Same as \fBexit\fP.
  1144. X  .TP
  1145. ***************
  1146. *** 2961,2966 ****
  1147. --- 3030,3038 ----
  1148. X  .B \ec
  1149. X  don't print an ending newline
  1150. X  .TP
  1151. + .B \ee
  1152. + escape
  1153. + .TP
  1154. X  .B \ef
  1155. X  form feed
  1156. X  .TP
  1157. ***************
  1158. *** 3009,3015 ****
  1159. --- 3081,3091 ----
  1160. X  \fBfalse\fP
  1161. X  Do nothing and return an exit code of 1.
  1162. X  .TP
  1163. + .PD 0
  1164. X  \fBfc\fP [ \-\fBe\fP \fIename\fP ] [ \-\fBnlr\fP ] [ \fIold\fP=\fInew\fP ... ] [ \fIfirst\fP [ \fIlast\fP ] ]
  1165. + .TP
  1166. + \fBfc\fP \-\fBRW\fP [ \fIfilename\fP ]
  1167. + .PD
  1168. X  Select a range of commands from \fIfirst\fP to \fIlast\fP from the
  1169. X  history list.
  1170. X  The arguments \fIfirst\fP and \fIlast\fP may be specified as a
  1171. ***************
  1172. *** 3032,3037 ****
  1173. --- 3108,3118 ----
  1174. X  or to \-1 if the \-\fBl\fP flag is given.
  1175. X  The flag \-\fBr\fP reverses the order of the commands and the
  1176. X  flag \-\fBn\fP suppresses command numbers when listing.
  1177. + .RS
  1178. + .PP
  1179. + \fBfc\fP \-\fBR\fP reads the history from the given file,
  1180. + and \fBfc\fP \-\fBW\fP writes the history out to the given file.
  1181. + .RE
  1182. X  .TP
  1183. X  .PD 0
  1184. X  \fBfg\fP [ \fIjob\fP ... ]
  1185. ***************
  1186. *** 3038,3044 ****
  1187. X  .TP
  1188. X  \fIjob\fP ...
  1189. X  .PD
  1190. ! Bring the specfied \fIjob\fPs to the foreground.
  1191. X  If no \fIjob\fP is specified, use the current job.
  1192. X  .TP
  1193. X  \fBfunctions\fP [ \(+-\fBtu\fP ] [ \fIname\fP ... ]
  1194. --- 3119,3125 ----
  1195. X  .TP
  1196. X  \fIjob\fP ...
  1197. X  .PD
  1198. ! Bring the specified \fIjob\fPs to the foreground.
  1199. X  If no \fIjob\fP is specified, use the current job.
  1200. X  .TP
  1201. X  \fBfunctions\fP [ \(+-\fBtu\fP ] [ \fIname\fP ... ]
  1202. ***************
  1203. *** 3493,3499 ****
  1204. X  Same as \fBwhence\fP.
  1205. X  .RE
  1206. X  .SH INVOCATION
  1207. ! If the shell is interactive and
  1208. X  the \fBNO_RCS\fP option is unset, commands are read
  1209. X  from /etc/zshrc and ~/.zshrc, in that order, if either file
  1210. X  exists.
  1211. --- 3574,3582 ----
  1212. X  Same as \fBwhence\fP.
  1213. X  .RE
  1214. X  .SH INVOCATION
  1215. ! If the \fBNO_RCS\fP option is unset, commands are read
  1216. ! from ~/.zshenv first.
  1217. ! Then, if the shell is interactive and
  1218. X  the \fBNO_RCS\fP option is unset, commands are read
  1219. X  from /etc/zshrc and ~/.zshrc, in that order, if either file
  1220. X  exists.
  1221. ***************
  1222. *** 3528,3533 ****
  1223. --- 3611,3618 ----
  1224. X  ksh(1),
  1225. X  clam(1).
  1226. X  .SH FILES
  1227. + ~/.zshenv
  1228. + .br
  1229. X  ~/.zshrc
  1230. X  .br
  1231. X  ~/.zlogin
  1232. ***************
  1233. *** 3544,3551 ****
  1234. X  .SH "UNDOCUMENTED FEATURES"
  1235. X  None known, but many suspected.
  1236. X  Please mail the author if you find any.
  1237. - .SH CAVEATS
  1238. - \fBzsh\fP is available for use by CS undergraduate
  1239. - concentrators between the hours of 8:00am and 5:00pm, and by
  1240. - faculty, staff, graduate students, and special guests
  1241. - of the Princeton University Department of Computer Science.
  1242. --- 3629,3631 ----
  1243. *** src/zsh0/zsh2.00/src/buildzsh    Wed Apr 24 18:10:03 1991
  1244. --- zsh2.00/src/buildzsh    Sun May  5 02:27:59 1991
  1245. ***************
  1246. *** 20,25 ****
  1247. --- 20,27 ----
  1248. X  fi
  1249. X  echo
  1250. X  echo '/* define this if you have WAITPID */'
  1251. + # this next line should read "sed 's/_^H//g'"
  1252. + # there should be a _(backspace) there
  1253. X  if man 2 wait 2>/dev/null | sed 's/_//g' | grep waitpid >/dev/null
  1254. X  then echo '#define WAITPID'
  1255. X  else echo '/* #define WAITPID */'
  1256. ***************
  1257. *** 61,67 ****
  1258. X  /* a string corresponding to the host type */
  1259. X  foo
  1260. X  echo '#define HOSTTYPE "' | tr -d '\012'
  1261. ! ( tcsh -c 'echo $HOSTTYPE' || arch || echo unknown ) 2>/dev/null |
  1262. X      tr -d '\012'
  1263. X  echo '"'
  1264. X  echo
  1265. --- 63,69 ----
  1266. X  /* a string corresponding to the host type */
  1267. X  foo
  1268. X  echo '#define HOSTTYPE "' | tr -d '\012'
  1269. ! ( tcsh -fc 'echo $HOSTTYPE' || arch || echo unknown ) 2>/dev/null |
  1270. X      tr -d '\012'
  1271. X  echo '"'
  1272. X  echo
  1273. ***************
  1274. *** 92,100 ****
  1275. X  '
  1276. X  fi
  1277. X  cat <<'foo'
  1278. - /* the path of zsh in the file system */
  1279. - #define MYSELF "/usr/local/bin/zsh"
  1280. X  /* define if you prefer "suspended" to "stopped" */
  1281. X  #define USE_SUSPENDED
  1282. X  
  1283. --- 94,99 ----
  1284. ***************
  1285. *** 113,123 ****
  1286. X  /*#define INTERACTIVE_COMMENTS*/
  1287. X  
  1288. X  #define _BSD_SIGNALS   /* this could be an iris, you never know */
  1289. X  foo
  1290. X  exec 1>&2
  1291. X  echo done
  1292. X  echo 'Building signals.h...' | tr -d '\012'
  1293. ! echo `csh -c 'kill -l'` | tr ' ' '\012' >signals.h
  1294. X  lct=`wc -l < signals.h`
  1295. X  cp signals.h signams.h
  1296. X  echo '1,$s/^/SIG/
  1297. --- 112,130 ----
  1298. X  /*#define INTERACTIVE_COMMENTS*/
  1299. X  
  1300. X  #define _BSD_SIGNALS   /* this could be an iris, you never know */
  1301. + /* if your compiler doesn't like void *, change this to char *
  1302. +     and ignore all the warnings.
  1303. + */
  1304. + typedef void *vptr;
  1305. + #define JOB_CONTROL
  1306. X  foo
  1307. X  exec 1>&2
  1308. X  echo done
  1309. X  echo 'Building signals.h...' | tr -d '\012'
  1310. ! echo `csh -fc 'kill -l'` | tr ' ' '\012' >signals.h
  1311. X  lct=`wc -l < signals.h`
  1312. X  cp signals.h signams.h
  1313. X  echo '1,$s/^/SIG/
  1314. ***************
  1315. *** 260,267 ****
  1316. X  if test -f /usr/lib/libbsd.a
  1317. X  then
  1318. X  if grep '+' /etc/passwd >/dev/null
  1319. ! then echo 'LIBS= -lcurses -lsun -lbsd -lmalloc'
  1320. ! else echo 'LIBS= -lcurses -lbsd -lmalloc'
  1321. X  fi
  1322. X  elif test -f /usr/lib/libtermcap.a
  1323. X  then echo 'LIBS= -ltermcap'
  1324. --- 267,274 ----
  1325. X  if test -f /usr/lib/libbsd.a
  1326. X  then
  1327. X  if grep '+' /etc/passwd >/dev/null
  1328. ! then echo 'LIBS= -lcurses -lsun -lbsd'
  1329. ! else echo 'LIBS= -lcurses -lbsd'
  1330. X  fi
  1331. X  elif test -f /usr/lib/libtermcap.a
  1332. X  then echo 'LIBS= -ltermcap'
  1333. ***************
  1334. *** 271,277 ****
  1335. --- 278,287 ----
  1336. X  
  1337. X  ZSHPATH=zsh
  1338. X  
  1339. + .KEEP_STATE:
  1340. X  # redefine these to work around Sun make bogosity
  1341. + # if they don't work, just remove them
  1342. X  
  1343. X  .c.o:
  1344. X      $(CC) $(CFLAGS) -c -o $*.o $<
  1345. ***************
  1346. *** 289,295 ****
  1347. X  tags: /tmp
  1348. X      ctags *.[cy]
  1349. X  
  1350. ! $(OBJS): config.h zsh.h zle.h
  1351. X  
  1352. X  clean:
  1353. X      rm -f *.o zsh core 
  1354. --- 299,305 ----
  1355. X  tags: /tmp
  1356. X      ctags *.[cy]
  1357. X  
  1358. ! $(OBJS): config.h zsh.h zle.h signals.h ztype.h funcs.h
  1359. X  
  1360. X  clean:
  1361. X      rm -f *.o zsh core 
  1362. *** src/zsh0/zsh2.00/src/builtin.c    Tue Apr 23 11:45:00 1991
  1363. --- zsh2.00/src/builtin.c    Mon May  6 06:15:10 1991
  1364. ***************
  1365. *** 31,37 ****
  1366. X  */
  1367. X  
  1368. X  #include "zsh.h"
  1369. - #include "funcs.h"
  1370. X  #include <sys/errno.h>
  1371. X  #include <sys/times.h>
  1372. X  
  1373. --- 31,36 ----
  1374. ***************
  1375. *** 47,59 ****
  1376. X  
  1377. X  /* builtin funcs */
  1378. X  
  1379. ! enum xbins {
  1380. !     BIN_TYPESET,BIN_BG,BIN_FG,BIN_JOBS,
  1381. !     BIN_WAIT,BIN_DISOWN,BIN_BREAK,BIN_CONTINUE,BIN_EXIT,
  1382. !     BIN_RETURN,BIN_SHIFT,BIN_CD,BIN_POPD,BIN_PUSHD,BIN_PRINT,
  1383. !     BIN_EVAL,BIN_SCHED,
  1384. !     BIN_FC,BIN_PUSHLINE,BIN_LOGOUT,BIN_BUILTIN
  1385. !     };
  1386. X  
  1387. X  struct bincmd {
  1388. X      char *name;
  1389. --- 46,72 ----
  1390. X  
  1391. X  /* builtin funcs */
  1392. X  
  1393. ! #define BIN_TYPESET 0
  1394. ! #define BIN_BG 1
  1395. ! #define BIN_FG 2
  1396. ! #define BIN_JOBS 3
  1397. ! #define BIN_WAIT 4
  1398. ! #define BIN_DISOWN 5
  1399. ! #define BIN_BREAK 6
  1400. ! #define BIN_CONTINUE 7
  1401. ! #define BIN_EXIT 8
  1402. ! #define BIN_RETURN 9
  1403. ! #define BIN_SHIFT 10
  1404. ! #define BIN_CD 11
  1405. ! #define BIN_POPD 12
  1406. ! #define BIN_PUSHD 13
  1407. ! #define BIN_PRINT 14
  1408. ! #define BIN_EVAL 15
  1409. ! #define BIN_SCHED 16
  1410. ! #define BIN_FC 17
  1411. ! #define BIN_PUSHLINE 18
  1412. ! #define BIN_LOGOUT 19
  1413. ! #define BIN_BUILTIN 20
  1414. X  
  1415. X  struct bincmd {
  1416. X      char *name;
  1417. ***************
  1418. *** 83,89 ****
  1419. X      "alias",bin_alias,0,-1,0,0,"ga",NULL,
  1420. X      "autoload",bin_typeset,0,-1,BINF_TYPEOPTS,0,"tx","fu",
  1421. X      "bg",bin_fg,0,-1,0,BIN_BG,NULL,NULL,
  1422. !     "bindkey",bin_bindkey,0,-1,0,0,"asvedrl",NULL,
  1423. X      "break",bin_break,0,1,0,BIN_BREAK,NULL,NULL,
  1424. X      "builtin",NULL,0,0,0,BIN_BUILTIN,NULL,NULL,
  1425. X      "bye",bin_break,0,1,0,BIN_EXIT,NULL,NULL,
  1426. --- 96,102 ----
  1427. X      "alias",bin_alias,0,-1,0,0,"ga",NULL,
  1428. X      "autoload",bin_typeset,0,-1,BINF_TYPEOPTS,0,"tx","fu",
  1429. X      "bg",bin_fg,0,-1,0,BIN_BG,NULL,NULL,
  1430. !     "bindkey",bin_bindkey,0,-1,0,0,"asvemdrl",NULL,
  1431. X      "break",bin_break,0,1,0,BIN_BREAK,NULL,NULL,
  1432. X      "builtin",NULL,0,0,0,BIN_BUILTIN,NULL,NULL,
  1433. X      "bye",bin_break,0,1,0,BIN_EXIT,NULL,NULL,
  1434. ***************
  1435. *** 101,107 ****
  1436. X      "exit",bin_break,0,1,0,BIN_EXIT,NULL,NULL,
  1437. X      "export",bin_typeset,0,-1,BINF_TYPEOPTS,0,"LRZfilrtu","x",
  1438. X      "false",bin_let,0,0,0,0,NULL,NULL,
  1439. !     "fc",bin_fc,0,-1,BINF_FCOPTS,BIN_FC,"nlre",NULL,
  1440. X      "fg",bin_fg,0,-1,0,BIN_FG,NULL,NULL,
  1441. X      "functions",bin_typeset,0,-1,BINF_TYPEOPTS,0,"tu","f",
  1442. X      "getln",bin_read,0,-1,0,0,NULL,"zr",
  1443. --- 114,120 ----
  1444. X      "exit",bin_break,0,1,0,BIN_EXIT,NULL,NULL,
  1445. X      "export",bin_typeset,0,-1,BINF_TYPEOPTS,0,"LRZfilrtu","x",
  1446. X      "false",bin_let,0,0,0,0,NULL,NULL,
  1447. !     "fc",bin_fc,0,-1,BINF_FCOPTS,BIN_FC,"nlreRW",NULL,
  1448. X      "fg",bin_fg,0,-1,0,BIN_FG,NULL,NULL,
  1449. X      "functions",bin_typeset,0,-1,BINF_TYPEOPTS,0,"tu","f",
  1450. X      "getln",bin_read,0,-1,0,0,NULL,"zr",
  1451. ***************
  1452. *** 127,134 ****
  1453. X      "rehash",bin_rehash,0,0,0,0,NULL,NULL,
  1454. X      "return",bin_break,0,1,0,BIN_RETURN,NULL,NULL,
  1455. X      "sched",bin_sched,0,-1,0,0,NULL,NULL,
  1456. !     "set",bin_set,0,-1,BINF_SETOPTS|BINF_PLUSOPTS,0,"0123456789ABCDEFGHIJKLMNOPQRSTUWXYZaefghijklmnsuvxy",NULL,
  1457. !     "setopt",bin_setopt,0,-1,0,0,"0123456789BCDEFGHIJKLMNOPQRSTUWXYZaefghijklmnsuvxy",NULL,
  1458. X      "shift",bin_break,0,1,0,BIN_SHIFT,NULL,NULL,
  1459. X      "source",bin_dot,1,-1,0,0,NULL,NULL,
  1460. X      "suspend",bin_suspend,0,0,0,0,"f",NULL,
  1461. --- 140,147 ----
  1462. X      "rehash",bin_rehash,0,0,0,0,NULL,NULL,
  1463. X      "return",bin_break,0,1,0,BIN_RETURN,NULL,NULL,
  1464. X      "sched",bin_sched,0,-1,0,0,NULL,NULL,
  1465. !     "set",bin_set,0,-1,BINF_SETOPTS|BINF_PLUSOPTS,0,"0123456789ABCDEFGHIJKLMNOPQRSTUWXYZaefghijklmnosuvwxy",NULL,
  1466. !     "setopt",bin_setopt,0,-1,BINF_PLUSOPTS,0,"0123456789BCDEFGHIJKLMNOPQRSTUWXYZaefghijklmnosuvwxy",NULL,
  1467. X      "shift",bin_break,0,1,0,BIN_SHIFT,NULL,NULL,
  1468. X      "source",bin_dot,1,-1,0,0,NULL,NULL,
  1469. X      "suspend",bin_suspend,0,0,0,0,"f",NULL,
  1470. ***************
  1471. *** 144,150 ****
  1472. X      "unhash",bin_unhash,1,-1,0,0,NULL,NULL,
  1473. X      "unlimit",bin_unlimit,0,-1,0,0,"h",NULL,
  1474. X      "unset",bin_unset,1,-1,0,0,NULL,NULL,
  1475. !     "unsetopt",bin_setopt,0,-1,0,1,"0123456789BCDEFGHIJKLMNOPQRSTUWXYZaefghijklmnsuvxy",NULL,
  1476. X      "vared",bin_vared,1,1,0,0,NULL,NULL,
  1477. X      "wait",bin_fg,0,-1,0,BIN_WAIT,NULL,NULL,
  1478. X      "whence",bin_whence,0,-1,0,0,"pv",NULL,
  1479. --- 157,163 ----
  1480. X      "unhash",bin_unhash,1,-1,0,0,NULL,NULL,
  1481. X      "unlimit",bin_unlimit,0,-1,0,0,"h",NULL,
  1482. X      "unset",bin_unset,1,-1,0,0,NULL,NULL,
  1483. !     "unsetopt",bin_setopt,0,-1,BINF_PLUSOPTS,1,"0123456789BCDEFGHIJKLMNOPQRSTUWXYZaefghijklmnosuvwxy",NULL,
  1484. X      "vared",bin_vared,1,1,0,0,NULL,NULL,
  1485. X      "wait",bin_fg,0,-1,0,BIN_WAIT,NULL,NULL,
  1486. X      "whence",bin_whence,0,-1,0,0,"pv",NULL,
  1487. ***************
  1488. *** 162,168 ****
  1489. X  
  1490. X      for (t0 = 0, b = builtins; b->name; b++,t0++)
  1491. X          {
  1492. !         c = zcalloc(sizeof *c);
  1493. X          c->type = BUILTIN;
  1494. X          c->u.binnum = t0;
  1495. X          addhperm(b->name,c,cmdnamtab,freecmdnam);
  1496. --- 175,181 ----
  1497. X  
  1498. X      for (t0 = 0, b = builtins; b->name; b++,t0++)
  1499. X          {
  1500. !         c = (Cmdnam) zcalloc(sizeof *c);
  1501. X          c->type = BUILTIN;
  1502. X          c->u.binnum = t0;
  1503. X          addhperm(b->name,c,cmdnamtab,freecmdnam);
  1504. ***************
  1505. *** 190,196 ****
  1506. X              }
  1507. X          else
  1508. X              {
  1509. !             c = zcalloc(sizeof *c);
  1510. X              c->type = BUILTIN;
  1511. X              c->u.binnum = t0;
  1512. X              addhperm(b->name,c,cmdnamtab,freecmdnam);
  1513. --- 203,209 ----
  1514. X              }
  1515. X          else
  1516. X              {
  1517. !             c = (Cmdnam) zcalloc(sizeof *c);
  1518. X              c->type = BUILTIN;
  1519. X              c->u.binnum = t0;
  1520. X              addhperm(b->name,c,cmdnamtab,freecmdnam);
  1521. ***************
  1522. *** 273,278 ****
  1523. --- 286,297 ----
  1524. X          zerrnam(name,"no job control in this shell.",NULL,0);
  1525. X          return 1;
  1526. X          }
  1527. +     if (!(jobtab[curjob].stat & STAT_INUSE))
  1528. +         {
  1529. +         curjob = prevjob; setprevjob();
  1530. +         if (!(jobtab[curjob].stat & STAT_INUSE))
  1531. +             curjob = prevjob; setprevjob();
  1532. +         }
  1533. X      if (func == BIN_JOBS)
  1534. X          stopmsg = 2;
  1535. X      if (!*argv)
  1536. ***************
  1537. *** 348,353 ****
  1538. --- 367,373 ----
  1539. X                          printdir(jobtab[job].cwd);
  1540. X                          printf(")\n");
  1541. X                          }
  1542. +                     fflush(stdout);
  1543. X                      settyinfo(&jobtab[job].ttyinfo);
  1544. X                      attachtty(jobtab[job].gleader);
  1545. X                      }
  1546. ***************
  1547. *** 419,425 ****
  1548. X              }
  1549. X          else
  1550. X              killrunjobs();
  1551. !     savehistfile();
  1552. X      if (islogin && unset(NORCS))
  1553. X          sourcehome(".zlogout");
  1554. X      if (sigtrapped[SIGEXIT])
  1555. --- 439,445 ----
  1556. X              }
  1557. X          else
  1558. X              killrunjobs();
  1559. !     savehistfile(getsparam("HISTFILE"),0);
  1560. X      if (islogin && unset(NORCS))
  1561. X          sourcehome(".zlogout");
  1562. X      if (sigtrapped[SIGEXIT])
  1563. ***************
  1564. *** 441,447 ****
  1565. X              chuck(t);
  1566. X          else
  1567. X              {
  1568. !             *t = tolower(*t);
  1569. X              t++;
  1570. X              }
  1571. X      for (o = optns; o->name; o++)
  1572. --- 461,467 ----
  1573. X              chuck(t);
  1574. X          else
  1575. X              {
  1576. !             *t = tulower(*t);
  1577. X              t++;
  1578. X              }
  1579. X      for (o = optns; o->name; o++)
  1580. ***************
  1581. *** 524,530 ****
  1582. X          printf("%s ()\n",s);
  1583. X          return;
  1584. X          }
  1585. !     t = gettext((void *) (cc->u.list),1);
  1586. X      printf("%s () {\n\t%s\n}\n",s,t);
  1587. X      free(t);
  1588. X  }
  1589. --- 544,550 ----
  1590. X          printf("%s ()\n",s);
  1591. X          return;
  1592. X          }
  1593. !     t = gettext((vptr) (cc->u.list),1);
  1594. X      printf("%s () {\n\t%s\n}\n",s,t);
  1595. X      free(t);
  1596. X  }
  1597. ***************
  1598. *** 640,646 ****
  1599. X  
  1600. X      for (; *argv; argv++)
  1601. X          {
  1602. !         if (!ops['p'] && (a = gethnode(*argv,aliastab)) && a->cmd)
  1603. X              {
  1604. X              if (a->cmd < 0)
  1605. X                  printf((v) ? "%s is a reserved word\n" : "%s\n",*argv);
  1606. --- 660,666 ----
  1607. X  
  1608. X      for (; *argv; argv++)
  1609. X          {
  1610. !         if (!ops['p'] && (a = (Alias) gethnode(*argv,aliastab)) && a->cmd)
  1611. X              {
  1612. X              if (a->cmd < 0)
  1613. X                  printf((v) ? "%s is a reserved word\n" : "%s\n",*argv);
  1614. ***************
  1615. *** 652,658 ****
  1616. X                  printf("%s is a global alias for %s\n",*argv,a->text);
  1617. X              retval = 0;
  1618. X              }
  1619. !         else if (!ops['p'] && (chn = gethnode(*argv,cmdnamtab)) &&
  1620. X                  (chn->type == SHFUNC || chn->type == BUILTIN))
  1621. X              {
  1622. X              if (chn->type == SHFUNC)
  1623. --- 672,678 ----
  1624. X                  printf("%s is a global alias for %s\n",*argv,a->text);
  1625. X              retval = 0;
  1626. X              }
  1627. !         else if (!ops['p'] && (chn = (Cmdnam) gethnode(*argv,cmdnamtab)) &&
  1628. X                  (chn->type == SHFUNC || chn->type == BUILTIN))
  1629. X              {
  1630. X              if (chn->type == SHFUNC)
  1631. ***************
  1632. *** 838,844 ****
  1633. X  {
  1634. X  struct cmdnam *chn;
  1635. X  
  1636. !     chn = zcalloc(sizeof *chn);
  1637. X      chn->type = EXCMD_PREDOT;
  1638. X      chn->u.nam = ztrdup(argv[1]);
  1639. X      addhnode(ztrdup(argv[0]),chn,cmdnamtab,freecmdnam);
  1640. --- 858,864 ----
  1641. X  {
  1642. X  struct cmdnam *chn;
  1643. X  
  1644. !     chn = (Cmdnam) zcalloc(sizeof *chn);
  1645. X      chn->type = EXCMD_PREDOT;
  1646. X      chn->u.nam = ztrdup(argv[1]);
  1647. X      addhnode(ztrdup(argv[0]),chn,cmdnamtab,freecmdnam);
  1648. ***************
  1649. *** 920,926 ****
  1650. X  
  1651. X      for (t0 = MAXJOB-1; t0 >= 0; t0--)
  1652. X          if (jobtab[t0].stat && jobtab[t0].procs && t0 != thisjob && 
  1653. !                 prefix(s,jobtab[t0].procs->text))
  1654. X              return t0;
  1655. X      return -1;
  1656. X  }
  1657. --- 940,946 ----
  1658. X  
  1659. X      for (t0 = MAXJOB-1; t0 >= 0; t0--)
  1660. X          if (jobtab[t0].stat && jobtab[t0].procs && t0 != thisjob && 
  1661. !                 jobtab[t0].procs->text && prefix(s,jobtab[t0].procs->text))
  1662. X              return t0;
  1663. X      return -1;
  1664. X  }
  1665. ***************
  1666. *** 969,978 ****
  1667. X                  zerrnam("kill","kill failed: %e",NULL,errno);
  1668. X                  return 1;
  1669. X                  }
  1670. !             if (jobtab[p].stat & STAT_STOPPED && sig == SIGCONT)
  1671. !                 jobtab[p].stat &= ~STAT_STOPPED;
  1672. !             if (sig != SIGKILL && sig != SIGCONT)
  1673. !                 killpg(jobtab[p].gleader,SIGCONT);
  1674. X              }
  1675. X          else
  1676. X              if (kill(atoi(*argv),sig) == -1)
  1677. --- 989,1002 ----
  1678. X                  zerrnam("kill","kill failed: %e",NULL,errno);
  1679. X                  return 1;
  1680. X                  }
  1681. !             if (jobtab[p].stat & STAT_STOPPED)
  1682. !                 {
  1683. !                 if (sig == SIGCONT)
  1684. !                     jobtab[p].stat &= ~STAT_STOPPED;
  1685. !                 if (sig != SIGKILL && sig != SIGCONT && sig != SIGTSTP
  1686. !                         && sig != SIGTTOU && sig != SIGTTIN && sig != SIGSTOP)
  1687. !                     killjb(jobtab+p,SIGCONT);
  1688. !                 }
  1689. X              }
  1690. X          else
  1691. X              if (kill(atoi(*argv),sig) == -1)
  1692. ***************
  1693. *** 1397,1409 ****
  1694. X  
  1695. X      if (!interact)
  1696. X          {
  1697. !         zerrnam("fc","not interactive shell",NULL,0);
  1698. X          return 1;
  1699. X          }
  1700. !     remhist();
  1701. X      while (*argv && equalsplit(*argv,&s))
  1702. X          {
  1703. !         struct asgment *a = alloc(sizeof *a);
  1704. X  
  1705. X          if (!asgf)
  1706. X              asgf = asgl = a;
  1707. --- 1421,1444 ----
  1708. X  
  1709. X      if (!interact)
  1710. X          {
  1711. !         zerrnam(nam,"not interactive shell",NULL,0);
  1712. X          return 1;
  1713. X          }
  1714. !     if (!(ops['l'] && unset(HISTNOSTORE)))
  1715. !         remhist();
  1716. !     if (ops['R'])
  1717. !         {
  1718. !         readhistfile(*argv ? *argv : getsparam("HISTFILE"),1);
  1719. !         return 0;
  1720. !         }
  1721. !     if (ops['W'])
  1722. !         {
  1723. !         savehistfile(*argv ? *argv : getsparam("HISTFILE"),1);
  1724. !         return 0;
  1725. !         }
  1726. X      while (*argv && equalsplit(*argv,&s))
  1727. X          {
  1728. !         struct asgment *a = (struct asgment *) alloc(sizeof *a);
  1729. X  
  1730. X          if (!asgf)
  1731. X              asgf = asgl = a;
  1732. ***************
  1733. *** 1460,1466 ****
  1734. X              {
  1735. X              retval = 1;
  1736. X              if (!fclist(out,0,ops['r'],first,last,asgf))
  1737. !                 if (fcedit(auxdata ? auxdata : DEFFCEDIT,fil))
  1738. X                      if (stuff(fil))
  1739. X                          zerrnam("fc","%e: %s",s,errno);
  1740. X                      else
  1741. --- 1495,1501 ----
  1742. X              {
  1743. X              retval = 1;
  1744. X              if (!fclist(out,0,ops['r'],first,last,asgf))
  1745. !                 if (fcedit(auxdata ? auxdata : fceditparam,fil))
  1746. X                      if (stuff(fil))
  1747. X                          zerrnam("fc","%e: %s",s,errno);
  1748. X                      else
  1749. ***************
  1750. *** 1502,1508 ****
  1751. X          if (asg->value)
  1752. X              addhnode(ztrdup(asg->name),mkanode(ztrdup(asg->value),incm),
  1753. X                  aliastab,freeanode);
  1754. !         else if (an = gethnode(asg->name,aliastab))
  1755. X              printalias(asg->name,an);
  1756. X          else
  1757. X              ret = 1;
  1758. --- 1537,1543 ----
  1759. X          if (asg->value)
  1760. X              addhnode(ztrdup(asg->name),mkanode(ztrdup(asg->value),incm),
  1761. X                  aliastab,freeanode);
  1762. !         else if (an = (Alias) gethnode(asg->name,aliastab))
  1763. X              printalias(asg->name,an);
  1764. X          else
  1765. X              ret = 1;
  1766. ***************
  1767. *** 1615,1621 ****
  1768. X              {
  1769. X              Cmdnam cc;
  1770. X  
  1771. !             if ((cc = gethnode(*argv,cmdnamtab)) && cc->type == SHFUNC)
  1772. X                  if (on)
  1773. X                      cc->flags |= on;
  1774. X                  else
  1775. --- 1650,1656 ----
  1776. X              {
  1777. X              Cmdnam cc;
  1778. X  
  1779. !             if ((cc = (Cmdnam) gethnode(*argv,cmdnamtab)) && cc->type == SHFUNC)
  1780. X                  if (on)
  1781. X                      cc->flags |= on;
  1782. X                  else
  1783. ***************
  1784. *** 1622,1628 ****
  1785. X                      pshfunc(*argv,cc);
  1786. X              else if (on & PMFLAG_u)
  1787. X                  {
  1788. !                 cc = zcalloc(sizeof *cc);
  1789. X                  cc->type = SHFUNC;
  1790. X                  cc->flags = on;
  1791. X                  addhnode(ztrdup(*argv),cc,cmdnamtab,freecmdnam);
  1792. --- 1657,1663 ----
  1793. X                      pshfunc(*argv,cc);
  1794. SHAR_EOF
  1795. true || echo 'restore of patches failed'
  1796. echo 'End of  part 1'
  1797. echo 'File patches is continued in part 2'
  1798. echo 2 > _shar_seq_.tmp
  1799. exit 0
  1800.               Paul Falstad  pfalstad@phoenix.princeton.edu
  1801.          And on the roads, too, vicious gangs of KEEP LEFT signs!
  1802.      If Princeton knew my opinions, they'd have expelled me long ago.
  1803.  
  1804. exit 0 # Just in case...
  1805. -- 
  1806. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1807. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1808. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1809. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1810.