Replies: 4 comments
-
The
Running the $ cat /tmp/alias
alias false=echo
false >/dev/null && test "$(false 97)" = 97
echo $?
$ ksh93 /tmp/alias
0
$ ksh93 -c '. /tmp/alias'
1
$ ksh88 -c '. /tmp/alias'
1 This is deeply embedded parser behavior that has been present since the release of ksh88. Changing it would likely require implementing a parser hack or a rewrite of the parser. |
Beta Was this translation helpful? Give feedback.
-
@JohnoKing Sorry, I completely missed that the alias failure was documented. Now I know. |
Beta Was this translation helpful? Give feedback.
-
I cannot find anything in the POSIX standard about line-by-line vs. entire-file parsing. I may have to ask clarification from the Austin Group to see if ksh needs to change to be compliant.
This failure is because the trace of Again, I'm not sure if this is a POSIX compliance issue or a legit implementation difference. |
Beta Was this translation helpful? Give feedback.
-
On the alias front: https://www.austingroupbugs.net/view.php?id=953#c4214 makes changes to the way aliases are specified and allows either behaviour. For the dot command:
For the rationale:
Note that testing whether aliases that share names with shell builtins is possible inside dot scripts even in ksh, so long as the dot scripts use
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The test suite is not needed for building GNU Automake, but meeting these criteria for a POSIX shell could be relevant for ksh93:
https://github.com/autotools-mirror/automake/blob/v1.16.5/configure.ac#L230-L328
This test fails first and disqualifies ksh93 as "a sturdy POSIX shell":
https://github.com/autotools-mirror/automake/blob/v1.16.5/configure.ac#L314-L320
Support for aliases named like shell builtins:
If that test is skipped, $am_score is 9, which is "barely acceptable", due to the following test:
https://github.com/autotools-mirror/automake/blob/v1.16.5/configure.ac#L301-L304
Shell corrupts stderr with "set -x":
Commit 2940b3f was the oldest version of ksh93 I tried.
If you would like, you can reproduce this in Debian Live under x86_64 QEMU:
Run the following in Debian Live:
At least bash, zsh, dash, and pdksh derivatives pass these tests.
If this is considered a bug, I would happily test any suggested patches.
Beta Was this translation helpful? Give feedback.
All reactions