git: f4727eca4057 - main - sh.1: document optional arguments to `:`
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 24 Feb 2025 16:20:32 UTC
The branch main has been updated by ziaee:
URL: https://cgit.FreeBSD.org/src/commit/?id=f4727eca405763dd1feb4ca3e17be40c2da337de
commit f4727eca405763dd1feb4ca3e17be40c2da337de
Author: Alexander Ziaee <ziaee@FreeBSD.org>
AuthorDate: 2025-01-09 17:51:57 +0000
Commit: Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2025-02-24 16:19:22 +0000
sh.1: document optional arguments to `:`
TIL the `:` command accepts and discards arguments, and this is
occasionally used to embed comments in interesting places. While
here, fix another `...` argument that was not marked up.
MFC after: 3 days
Thanks: Community Discord
Approved by: carlavilla, mhorne (mentors)
Differential Revision: https://reviews.freebsd.org/D48398
---
bin/sh/sh.1 | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1
index a34f7676fffa..3d3f200a8e17 100644
--- a/bin/sh/sh.1
+++ b/bin/sh/sh.1
@@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd November 20, 2024
+.Dd January 10, 2025
.Dt SH 1
.Os
.Sh NAME
@@ -1945,8 +1945,9 @@ make it the first or last character listed.
.Ss Built-in Commands
This section lists the built-in commands.
.Bl -tag -width indent
-.It Ic \&:
+.It Ic \&: Op Ar arg Ar ...
A null command that returns a 0 (true) exit value.
+Any arguments are discarded.
.It Ic \&. Ar file
The commands in the specified file are read and executed by the shell.
The
@@ -1968,7 +1969,7 @@ it is sought in the current working directory.
.It Ic \&[
A built-in equivalent of
.Xr test 1 .
-.It Ic alias Oo Ar name Ns Oo = Ns Ar string Oc ... Oc
+.It Ic alias Oo Ar name Ns Oo = Ns Ar string Oc Ar ... Oc
If
.Ar name Ns = Ns Ar string
is specified, the shell defines the alias