Discussion:
[ast-developers] Shell option keyword and alias
Dr. Werner Fink
2013-06-11 16:01:43 UTC
Permalink
Hi,

just a bug report here with ksh Version AJM 94u+ 2012-08-01

$ set -k
$ alias dt=date
autoload='typeset -fu'
command='command '
compound='typeset -C'
[...]
times='{ { time;} 2>&1;}'
type='whence -v'

after `set -k' even a `set +k' does not repair the alias builtin
that is it is impossible to assign a new alias as it always lists
the current aliases.

Temporary disabling the shell option SH_KEYWORD in sh_exec()
in the same as for command line editors does avoid a broken
alias builtin after `set +k' but does not help get the arguments
down to the alias builtin.


Werner
--
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
Dr. Werner Fink
2013-06-11 16:53:41 UTC
Permalink
Post by Dr. Werner Fink
Hi,
just a bug report here with ksh Version AJM 94u+ 2012-08-01
$ set -k
$ alias dt=date
autoload='typeset -fu'
command='command '
compound='typeset -C'
[...]
times='{ { time;} 2>&1;}'
type='whence -v'
after `set -k' even a `set +k' does not repair the alias builtin
that is it is impossible to assign a new alias as it always lists
the current aliases.
Temporary disabling the shell option SH_KEYWORD in sh_exec()
in the same as for command line editors does avoid a broken
alias builtin after `set +k' but does not help get the arguments
down to the alias builtin.
The attached patch seems to fix the problem. The test suite is
fulfilled.

Werner
--
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ksh93-alias-k.dif
Type: text/x-patch
Size: 653 bytes
Desc: ksh93-alias-k.patch
URL: <http://lists.research.att.com/pipermail/ast-developers/attachments/20130611/bceb7b83/attachment.bin>
Loading...