diff --git a/src/cmd/ksh93/bltins/typeset.c b/src/cmd/ksh93/bltins/typeset.c index eaf0fda55..968e4ec4b 100644 --- a/src/cmd/ksh93/bltins/typeset.c +++ b/src/cmd/ksh93/bltins/typeset.c @@ -221,7 +221,7 @@ int b_typeset(int argc,register char *argv[],Shbltin_t *context) else if(argv[0][0] != 't') /* not ypeset */ { char **new_argv = (char **)stakalloc((argc + 2) * sizeof(char*)); - new_argv[0] = "typeset"; + error_info.id = new_argv[0] = SYSTYPESET->nvname; if(argv[0][0] == 'a') /* utoload == typeset -fu */ new_argv[1] = "-fu"; else if(argv[0][0] == 'c') /* ompound == typeset -C */ diff --git a/src/cmd/ksh93/tests/builtins.sh b/src/cmd/ksh93/tests/builtins.sh index 32bcbc7d0..3eebd96d4 100755 --- a/src/cmd/ksh93/tests/builtins.sh +++ b/src/cmd/ksh93/tests/builtins.sh @@ -1039,6 +1039,8 @@ do case $bltin in actual=$({ PATH=${bltin%/*}; "${bltin##*/}" --this-option-does-not-exist; } 2>&1) ;; */*) err_exit "strange path name in 'builtin' output: $(printf %q "$bltin")" continue ;; + autoload | compound | float | functions | integer | nameref) + bltin=typeset ;& *) expect="Usage: $bltin " actual=$({ "${bltin}" --this-option-does-not-exist; } 2>&1) ;; esac