index | | raw e-mail
Resurrect standalone command
While command(1) is now classified by POSIX as an intrinsic utility and
no longer required to exist as a standalone program, it turns out that
we still have a use for it (cf. env(1)), so resurrect it.
PR: 291879
Fixes: 4100bd6caa66 ("usr.bin: Remove intrinsic utilities")
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D54341
---
ObsoleteFiles.inc | 1 -
usr.bin/Makefile | 1 +
usr.bin/command/Makefile | 4 ++++
usr.bin/command/command.sh | 2 ++
4 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index 5034f84e1295..8c421ec4cc01 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -55,7 +55,6 @@
OLD_FILES+=usr/bin/alias
OLD_FILES+=usr/bin/bg
OLD_FILES+=usr/bin/cd
-OLD_FILES+=usr/bin/command
OLD_FILES+=usr/bin/fc
OLD_FILES+=usr/bin/fg
OLD_FILES+=usr/bin/getopts
diff --git a/usr.bin/Makefile b/usr.bin/Makefile
index 844a2312fd73..5fa9821466da 100644
--- a/usr.bin/Makefile
+++ b/usr.bin/Makefile
@@ -23,6 +23,7 @@ SUBDIR= apply \
colrm \
column \
comm \
+ command \
compress \
csplit \
ctlstat \
diff --git a/usr.bin/command/Makefile b/usr.bin/command/Makefile
new file mode 100644
index 000000000000..786d3d9c6d06
--- /dev/null
+++ b/usr.bin/command/Makefile
@@ -0,0 +1,4 @@
+SCRIPTS=command.sh
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/usr.bin/command/command.sh b/usr.bin/command/command.sh
new file mode 100755
index 000000000000..ab378f1e729a
--- /dev/null
+++ b/usr.bin/command/command.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+builtin command "$@"
help
