1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

POSIX compliance fix: make 'unalias' a regular builtin

Both 'alias' and 'unalias' are specified as regular builtins. Among
a few other things, that means it ought to be portable to use these
names for shell functions. But ksh93 disallowed that until now.

src/cmd/ksh93/data/builtins.c:
- Make 'unalias' a regular builtin by removing the BLT_SPC flag.
- (same fix for 'alias' was already done in afa68dca)
- Add the BLT_ENV flag to the 'alias' and 'hash' commands. In
  include/name.h, this flag is commented: "non-stoppable, can
  modify environment". The "non-stoppable" bit seems like a good
  idea: these operations should not be interruptable as that would
  cause an inconsistent state.

src/cmd/ksh93/sh.1:
- Remove the '-', indicating special builtin, from 'alias' entry.
- Minor cosmetic fix: space after the '-' for 'unset'.

(cherry picked from commit a4315d7672204acb543010b4d4916b22dcb9cb08)
This commit is contained in:
Martijn Dekker 2020-06-11 12:43:17 +02:00
parent 2da22f4023
commit 04b9171858
4 changed files with 15 additions and 9 deletions

View file

@ -7738,7 +7738,7 @@ option causes the mode to be printed as a symbolic
value. Otherwise, the
mask is printed in octal.
.TP
\(dg \f3unalias\fP \*(OK \f3\-a\fP \*(CK \f2name\^\fP .\|.\|.
\f3unalias\fP \*(OK \f3\-a\fP \*(CK \f2name\^\fP .\|.\|.
The aliases
given by the list of
.IR name s
@ -7748,7 +7748,7 @@ The
option causes all the
aliases to be unset.
.TP
\(dg\f3unset\fP \*(OK \f3\-fnv\fP \*(CK \f2vname\^\fP .\|.\|.
\(dg \f3unset\fP \*(OK \f3\-fnv\fP \*(CK \f2vname\^\fP .\|.\|.
The variables given by the list of
.IR vname s
are unassigned,