1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00
cde/src/cmd/ksh93/sh
Martijn Dekker 41ee12a527 Document history expansion and fix a few loose ends
src/cmd/ksh93/sh.1:
- Add a new section on history expansion mostly adapted from the
  "History substitution" section from the tcsh(1) man page. This
  has the standard BSD license which is already in the COPYRIGHT
  file. Inapplicable stuff was removed, some new stuff added.

src/cmd/ksh93/edit/hexpand.c,
src/cmd/ksh93/sh/io.c:
- Set '#' as the default history comment character as on bash;
  no longer disable it by default.
- Add the 'a' modifier as a synonym for 'g', as on bash.
- Remove pointless static keyword from np variable; since the
  value from previous calls is never used it can just be local.
- Use NV_NOADD flag with nv_open() to avoid pointlessly creating
  the node if the variable doesn't exist yet.
- Fix a bug in history expansion where the 'p' modifier had no
  effect if the 'histverify' option is on.
  Reproducer:
    $ set -H -o histv
    $ true a b c
    $ !!:p
    $ true a b c▁  <= instead of printed, the line is re-edited
  Expected:
    $ set -H -o histv
    $ true a b c
    $ !!:p
    true a b c
    $ ▁
  This is fixed by making 'p' remove the HIST_EVENT bit from the
  returned flag bits in hist_expand(), leaving only the HIST_PRINT
  flag, then adding special handling for this case to slowread()
  in io.c (print the line, then instead of executing it, continue
  and read the next line).
2022-01-25 03:45:47 +00:00
..
args.c Various minor cleanups and fixes 2022-01-20 00:54:42 +00:00
arith.c [shp cleanup 01..20] all the rest (re: 2d3ec8b6) 2022-01-07 16:16:31 +00:00
array.c [shp cleanup 01..20] all the rest (re: 2d3ec8b6) 2022-01-07 16:16:31 +00:00
defs.c [shp cleanup 00] Reunify the original sh state struct 2022-01-01 02:28:06 +00:00
deparse.c INIT: remove proto, ratz (re: 46593a89, 6137b99a); major cleanup 2021-12-24 07:05:22 +00:00
expand.c [shp cleanup 01..20] all the rest (re: 2d3ec8b6) 2022-01-07 16:16:31 +00:00
fault.c [shp cleanup 01..20] all the rest (re: 2d3ec8b6) 2022-01-07 16:16:31 +00:00
fcin.c INIT: remove proto, ratz (re: 46593a89, 6137b99a); major cleanup 2021-12-24 07:05:22 +00:00
init.c edit: do not enable multiline mode with no editor active 2022-01-12 20:39:05 +00:00
io.c Document history expansion and fix a few loose ends 2022-01-25 03:45:47 +00:00
jobs.c Fix various typos, man page issues and improve the documentation (#415) 2022-01-07 16:17:55 +00:00
lex.c [shp cleanup 01..20] all the rest (re: 2d3ec8b6) 2022-01-07 16:16:31 +00:00
macro.c [shp cleanup 01..20] all the rest (re: 2d3ec8b6) 2022-01-07 16:16:31 +00:00
main.c [shp cleanup 01..20] all the rest (re: 2d3ec8b6) 2022-01-07 16:16:31 +00:00
name.c Various minor cleanups and fixes 2022-01-20 00:54:42 +00:00
nvdisc.c Fix use after free bug in discipline functions (#424) 2022-01-14 19:51:24 +00:00
nvtree.c [shp cleanup 01..20] all the rest (re: 2d3ec8b6) 2022-01-07 16:16:31 +00:00
nvtype.c [shp cleanup 01..20] all the rest (re: 2d3ec8b6) 2022-01-07 16:16:31 +00:00
parse.c [shp cleanup 01..20] all the rest (re: 2d3ec8b6) 2022-01-07 16:16:31 +00:00
path.c bump internal libast version; various minor cleanups 2022-01-14 19:55:35 +00:00
pmain.c INIT: remove proto, ratz (re: 46593a89, 6137b99a); major cleanup 2021-12-24 07:05:22 +00:00
shcomp.c edit: do not enable multiline mode with no editor active 2022-01-12 20:39:05 +00:00
streval.c [shp cleanup 01..20] all the rest (re: 2d3ec8b6) 2022-01-07 16:16:31 +00:00
string.c [shp cleanup 01..20] all the rest (re: 2d3ec8b6) 2022-01-07 16:16:31 +00:00
subshell.c tie up standards macros loose ends (re: 289dd46c) 2022-01-20 05:50:00 +00:00
suid_exec.c Fix various typos, man page issues and improve the documentation (#415) 2022-01-07 16:17:55 +00:00
tdump.c INIT: remove proto, ratz (re: 46593a89, 6137b99a); major cleanup 2021-12-24 07:05:22 +00:00
timers.c [shp cleanup 01..20] all the rest (re: 2d3ec8b6) 2022-01-07 16:16:31 +00:00
trestore.c [shp cleanup 01..20] all the rest (re: 2d3ec8b6) 2022-01-07 16:16:31 +00:00
waitevent.c [shp cleanup 01..20] all the rest (re: 2d3ec8b6) 2022-01-07 16:16:31 +00:00
xec.c bump internal libast version; various minor cleanups 2022-01-14 19:55:35 +00:00