]> git.ipfire.org Git - thirdparty/make.git/commitdiff
* job.c: Add "command" as a known shell built-in.
authorPaul Smith <psmith@gnu.org>
Sun, 12 Nov 2017 23:10:28 +0000 (18:10 -0500)
committerPaul Smith <psmith@gnu.org>
Sat, 18 Nov 2017 14:31:31 +0000 (09:31 -0500)
This is not a POSIX shell built-in but it's common in UNIX shells.
Reported by Nick Bowler <nbowler@draconx.ca>.

job.c

diff --git a/job.c b/job.c
index 5ad2b7f045794fc946c5ee13ee9d4d6e9997a616..a13aadaffe51764d97e99488a8ffe774a582c8eb 100644 (file)
--- a/job.c
+++ b/job.c
@@ -2550,7 +2550,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
     { "cd", "echo", "eval", "exec", "exit", "login", "logout", "set", "umask",
       "wait", "while", "for", "case", "if", ":", ".", "break", "continue",
       "export", "read", "readonly", "shift", "times", "trap", "switch",
-      "unset", "ulimit", 0 };
+      "unset", "ulimit", "command", 0 };
 
   const char *sh_chars;
   const char **sh_cmds;
@@ -2577,7 +2577,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
     { "echo", "cd", "eval", "exec", "exit", "login", "logout", "set", "umask",
       "wait", "while", "for", "case", "if", ":", ".", "break", "continue",
       "export", "read", "readonly", "shift", "times", "trap", "switch",
-      "unset", 0 };
+      "unset", "command", 0 };
 
   const char *sh_chars;
   const char **sh_cmds;
@@ -2587,7 +2587,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
   static const char *sh_cmds[] =
     { "cd", "eval", "if", "delete", "echo", "copy", "rename", "set", "setenv",
       "date", "makedir", "skip", "else", "endif", "path", "prompt", "unset",
-      "unsetenv", "version", 0 };
+      "unsetenv", "version", "command", 0 };
 
 #elif defined (WINDOWS32)
   /* We used to have a double quote (") in sh_chars_dos[] below, but
@@ -2610,7 +2610,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
   static const char *sh_cmds_sh[] =
     { "cd", "eval", "exec", "exit", "login", "logout", "set", "umask", "wait",
       "while", "for", "case", "if", ":", ".", "break", "continue", "export",
-      "read", "readonly", "shift", "times", "trap", "switch", "test",
+      "read", "readonly", "shift", "times", "trap", "switch", "test", "command",
 #ifdef BATCH_MODE_ONLY_SHELL
       "echo",
 #endif
@@ -2624,10 +2624,10 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
 #else  /* must be UNIX-ish */
   static const char *sh_chars = "#;\"*?[]&|<>(){}$`^~!";
   static const char *sh_cmds[] =
-    { ".", ":", "break", "case", "cd", "continue", "eval", "exec", "exit",
-      "export", "for", "if", "login", "logout", "read", "readonly", "set",
-      "shift", "switch", "test", "times", "trap", "ulimit", "umask", "unset",
-      "wait", "while", 0 };
+    { ".", ":", "break", "case", "cd", "command", "continue", "eval", "exec",
+      "exit", "export", "for", "if", "login", "logout", "read", "readonly",
+      "set", "shift", "switch", "test", "times", "trap", "ulimit", "umask",
+      "unset", "wait", "while", 0 };
 
 # ifdef HAVE_DOS_PATHS
   /* This is required if the MSYS/Cygwin ports (which do not define