On Tue, Jun 11, 2013 at 06:01:43PM +0200, Werner Fink wrote:
> 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
--- src/cmd/ksh93/data/builtins.c
+++ src/cmd/ksh93/data/builtins.c	2013-06-11 16:24:46.269439322 +0000
@@ -78,8 +78,8 @@ const struct shtable3 shtab_builtins[] =
 #if _bin_newgrp || _usr_bin_newgrp
 	"newgrp",	NV_BLTIN|BLT_ENV|BLT_SPC,	Bltin(login),
 #endif	/* _bin_newgrp || _usr_bin_newgrp */
-	"alias",	NV_BLTIN|BLT_SPC,		bltin(alias),
-	"hash",		NV_BLTIN|BLT_SPC,		bltin(alias),
+	"alias",	NV_BLTIN|BLT_SPC|BLT_DCL,	bltin(alias),
+	"hash",		NV_BLTIN|BLT_SPC|BLT_DCL,	bltin(alias),
 	"enum",		NV_BLTIN|BLT_ENV|BLT_SPC|BLT_DCL,bltin(enum),
 	"eval",		NV_BLTIN|BLT_ENV|BLT_SPC|BLT_EXIT,bltin(eval),
 	"exit",		NV_BLTIN|BLT_ENV|BLT_SPC,	bltin(return),
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to