summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/sh/exec.c2
-rw-r--r--tools/regression/bin/sh/builtins/type3.03
2 files changed, 5 insertions, 0 deletions
diff --git a/bin/sh/exec.c b/bin/sh/exec.c
index 5f78de9..9f8e029 100644
--- a/bin/sh/exec.c
+++ b/bin/sh/exec.c
@@ -762,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));
}
diff --git a/tools/regression/bin/sh/builtins/type3.0 b/tools/regression/bin/sh/builtins/type3.0
new file mode 100644
index 0000000..87cccdd
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/type3.0
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+[ "$(type type)" = "$(type -- type)" ]
OpenPOWER on IntegriCloud