aboutsummaryrefslogtreecommitdiff
path: root/bin/sh/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh/exec.c')
-rw-r--r--bin/sh/exec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/sh/exec.c b/bin/sh/exec.c
index 6c3a6ddbf783..9f8e029933eb 100644
--- a/bin/sh/exec.c
+++ b/bin/sh/exec.c
@@ -70,7 +70,6 @@ __FBSDID("$FreeBSD$");
#include "syntax.h"
#include "memalloc.h"
#include "error.h"
-#include "init.h"
#include "mystring.h"
#include "show.h"
#include "jobs.h"
@@ -763,5 +762,7 @@ typecmd_impl(int argc, char **argv, int cmd, const char *path)
int
typecmd(int argc, char **argv)
{
+ if (argc > 2 && strcmp(argv[1], "--") == 0)
+ argc--, argv++;
return typecmd_impl(argc, argv, TYPECMD_TYPE, bltinlookup("PATH", 1));
}