diff --git a/NEWS b/NEWS index 53d727d43..ab951b925 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,12 @@ Any uppercase BUG_* names are modernish shell bug IDs. another with those used by all of the shell's child processes. https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_27 +- The default aliases command='command ' and nohup='nohup ' have been + removed because they caused breakage in an attempt to circumvent other + breakage which is being fixed. In the unlikely even that anyone still + needs alias substitution to continue on the command argument following + 'command' or 'nohup', it's easy to set these aliases yourself. + 2020-06-05: - Fix a bug that caused special variables such as PATH, LANG, LC_ALL, diff --git a/TODO b/TODO index 773850908..b24f59335 100644 --- a/TODO +++ b/TODO @@ -10,29 +10,9 @@ Fix build failures: - ksh does not currently build on AIX, HP-UX, Solaris, or QNX. -______ -Remove hack for 'test -t' with no args == 'test -t 1': -- from sh/parse.c, qscan() -- from bltins/test.c - ______ Fix or remove broken default aliases: -- Remove alias times='{ { time;} 2>&1;}' which does not produce POSIX- - compliant output; reimplement as a proper POSIX-compliant builtin. - In any case, implementing a standard utility as an alias is unacceptable - as 'unalias -a' (remove all aliases) should not remove standard utilities! - Backport the builtin from the abandoned Vashisht/Rader branch: - https://github.com/att/ast/pull/1332 - -- Remove alias command='command '. Continuing alias substitution after - 'command' (due to the final space in the alias) is inherently broken, as - aliases may contain arbitrary shell grammar. For instance, when combining - this default alias with the default 'times' alias ('command times'), which - is perfectly valid per POSIX, you get a syntax error! - -- Remove alias nohup='nohup '. Same reason as for 'command ' above. - - Remove pointless default aliases 'fc' and 'type'; these are already implemented as normal shell builtins. Add man page entries for these. diff --git a/src/cmd/ksh93/data/aliases.c b/src/cmd/ksh93/data/aliases.c index fab6476dc..61e0b2dec 100644 --- a/src/cmd/ksh93/data/aliases.c +++ b/src/cmd/ksh93/data/aliases.c @@ -33,7 +33,6 @@ const struct shtable2 shtab_aliases[] = "2d", NV_NOFREE, "set -f;_2d", #endif /* SHOPT_FS_3D */ "autoload", NV_NOFREE, "typeset -fu", - "command", NV_NOFREE, "command ", "compound", NV_NOFREE|BLT_DCL, "typeset -C", "fc", NV_NOFREE, "hist", "float", NV_NOFREE|BLT_DCL, "typeset -lE", @@ -42,7 +41,6 @@ const struct shtable2 shtab_aliases[] = "history", NV_NOFREE, "hist -l", "integer", NV_NOFREE|BLT_DCL, "typeset -li", "nameref", NV_NOFREE|BLT_DCL, "typeset -n", - "nohup", NV_NOFREE, "nohup ", "r", NV_NOFREE, "hist -s", "redirect", NV_NOFREE, "command exec", "source", NV_NOFREE, "command .", diff --git a/src/cmd/ksh93/sh.1 b/src/cmd/ksh93/sh.1 index acb78fac3..4a7bf1e1a 100644 --- a/src/cmd/ksh93/sh.1 +++ b/src/cmd/ksh93/sh.1 @@ -790,8 +790,6 @@ but can be unset or redefined: .TP .B "autoload=\(fmtypeset \-fu\(fm" .TP -.B "command=\(fmcommand \(fm" -.TP .B "compound=\(fmtypeset \-C\(fm" .TP .B "fc=hist" @@ -808,8 +806,6 @@ but can be unset or redefined: .TP .B "nameref=\(fmtypeset \-n\(fm" .TP -.B "nohup=\(fmnohup \(fm" -.TP .B "r=\(fmhist \-s\(fm" .TP .B "redirect=\(fmcommand exec\(fm" @@ -5811,7 +5807,7 @@ the operating system's standard utilities path rather than the one defined by the value of .SM .BR PATH . -Functions will not be searched for when finding +Functions and aliases will not be searched for when finding .IR name . In addition, if .I name\^