1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-24 06:54:13 +00:00
cde/src/cmd/ksh93/tests
Martijn Dekker ddaa145b3d Reinstate 'r' and 'history' as preset aliases for interactive ksh
Following a community discussion, it became clear that 'r' is
particularly problematic as a regular builtin, as the name can and
does conflict with at least one legit external command by that
name. There was a consensus against removing it altogether and
letting users set the alias in their login scripts. However,
aliases are easier to bypass, remove or rename than builtins are.
My compromise is to reinstate 'r' as a preset alias on interactive
shells only, along with 'history', as was done in 17f81ebe before
they were converted to builtins in 03224ae3. So this reintroduces
the notion of predefined aliases to ksh 93u+m, but only for
interactive shells that are not initialised in POSIX mode.

src/cmd/ksh93/Makefile,
src/cmd/ksh93/Mamfile,
src/cmd/ksh93/include/shtable.h,
src/cmd/ksh93/data/aliases.c:
- Restore aliases.c containing shtab_aliases[], a table specifying
  the preset aliases.

src/cmd/ksh93/include/shtable.h,
src/cmd/ksh93/sh/init.c:
- Rename inittree() to sh_inittree() and make it extern, because we
  need to use it in main.c (sh_main()).

src/cmd/ksh93/sh/main.c: sh_main():
- Init preset aliases from shtab_aliases[] only if the shell is
  interactive and not in POSIX mode.

src/cmd/ksh93/bltins/typeset.c,
src/cmd/ksh93/tests/alias.sh:
- unall(): When unsetting an alias, pass on the NV_NOFREE attribute
  to nv_delete() to avoid an erroneous attempt to free a preset
  alias from read-only memory. See: 5d50f825

src/cmd/ksh93/data/builtins.c:
- Remove "history" and "r" entries from shtab_builtins[].
- Revert changes to inline fc/hist docs in sh_opthist[].

src/cmd/ksh93/bltins/hist.c: b_hist():
- Remove handling for 'history' and 'r' as builtins.

src/cmd/ksh93/sh.1:
- Update accordingly.

Resolves: https://github.com/ksh93/ksh/issues/125
2020-09-11 21:35:45 +02:00
..
alias.sh Reinstate 'r' and 'history' as preset aliases for interactive ksh 2020-09-11 21:35:45 +02:00
append.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
arith.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
arrays.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
arrays2.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
attributes.sh -o posix: don't import/export variable attributes thru environment 2020-09-05 11:41:02 +02:00
basic.sh Fix BUG_LOOPRET2 and related return/exit misbehaviour 2020-09-09 20:02:20 +02:00
bracket.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
builtins.sh Fix 'command' expansion bug and POSIX compliance 2020-09-11 10:06:43 +02:00
case.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
comvar.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
comvario.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
coprocess.sh tests/coprocess.sh: fix rare fail (re: 712261c8) 2020-09-06 22:40:17 +02:00
cubetype.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
enum.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
exit.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
expand.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
functions.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
glob.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
grep.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
heredoc.sh Fix ${!} and ${$} throwing syntax error in here-document 2020-09-04 04:54:35 +02:00
io.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
leaks.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
locale.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
math.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
nameref.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
namespace.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
options.sh fix "$-" expansion for posix option (re: 921bbcae) 2020-09-04 21:03:28 +02:00
path.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
pointtype.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
pty.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
quoting.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
quoting2.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
readcsv.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
recttype.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
restricted.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
return.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
select.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
shtests shtests: add ${.sh.pid} to PS4/xtrace (re: 9de65210) 2020-09-02 15:51:02 +01:00
sigchld.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
signal.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
statics.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
subshell.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
substring.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
tilde.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
timetype.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
treemove.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
types.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
variables.sh Fix subshell leak for 3 special variables (re: 417883df, bd3e2a80) 2020-09-05 20:47:03 +02:00
vartree1.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00
vartree2.sh shtests: cd to each test set's temp dir before running 2020-09-02 06:02:40 +01:00