aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 96d2433d3..e91566994 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -12123,18 +12123,19 @@ simplecmd(void)
12123 if (args && app == &args->narg.next 12123 if (args && app == &args->narg.next
12124 && !vars && !redir 12124 && !vars && !redir
12125 ) { 12125 ) {
12126 struct builtincmd *bcmd; 12126// struct builtincmd *bcmd;
12127 const char *name; 12127// const char *name;
12128 12128
12129 /* We have a function */ 12129 /* We have a function */
12130 if (IF_BASH_FUNCTION(!function_flag &&) readtoken() != TRP) 12130 if (IF_BASH_FUNCTION(!function_flag &&) readtoken() != TRP)
12131 raise_error_unexpected_syntax(TRP); 12131 raise_error_unexpected_syntax(TRP);
12132 name = n->narg.text; 12132//bash allows functions named "123", "..", "return"!
12133 if (!goodname(name) 12133// name = n->narg.text;
12134 || ((bcmd = find_builtin(name)) && IS_BUILTIN_SPECIAL(bcmd)) 12134// if (!goodname(name)
12135 ) { 12135// || ((bcmd = find_builtin(name)) && IS_BUILTIN_SPECIAL(bcmd))
12136 raise_error_syntax("bad function name"); 12136// ) {
12137 } 12137// raise_error_syntax("bad function name");
12138// }
12138 n->type = NDEFUN; 12139 n->type = NDEFUN;
12139 checkkwd = CHKNL | CHKKWD | CHKALIAS; 12140 checkkwd = CHKNL | CHKKWD | CHKALIAS;
12140 n->ndefun.text = n->narg.text; 12141 n->ndefun.text = n->narg.text;