This file is builtin.def, from which is created builtin.c.
It implements the builtin "builtin" in Bash.
-Copyright (C) 1987, 1989, 1991 Free Software Foundation, Inc.
+Copyright (C) 1987-2002 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
#include "../shell.h"
#include "common.h"
+#include "bashgetopt.h"
extern char *this_command_name;
sh_builtin_func_t *function;
register char *command;
- if (!list)
+ if (no_options (list))
+ return (EX_USAGE);
+ list = loptend; /* skip over possible `--' */
+
+ if (list == 0)
return (EXECUTION_SUCCESS);
- command = (list->word->word);
+ command = list->word->word;
#if defined (DISABLED_BUILTINS)
function = builtin_address (command);
#else /* !DISABLED_BUILTINS */