aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2025-12-23 10:36:39 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2025-12-23 10:36:39 +0000
commit745c6c0431d01b4fc3247f4eac08a2181d71e008 (patch)
treef4b55f4bf2901f8069e3b32ba91fecff7ee2c49d
parentae12432049e7873ab3912643ae5d08297b8cbc49 (diff)
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
-rw-r--r--ObsoleteFiles.inc1
-rw-r--r--usr.bin/Makefile1
-rw-r--r--usr.bin/command/Makefile4
-rwxr-xr-xusr.bin/command/command.sh2
4 files changed, 7 insertions, 1 deletions
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 "$@"