bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 6/7] builtins/test: Document handling of parameters


From: Gioele Barabucci
Subject: [PATCH v2 6/7] builtins/test: Document handling of parameters
Date: Mon, 22 Sep 2025 16:19:08 +0200

From: Matthias Klose <doko@debian.org>

This addition to the documentation has been shipped in Debian's bash
since version 3.0-9.

Co-authored-by: G. Branden Robinson
---
 builtins/test.def | 3 +++
 doc/bash.1        | 9 +++++++++
 doc/bashref.texi  | 4 ++++
 3 files changed, 16 insertions(+)

diff --git a/builtins/test.def b/builtins/test.def
index b6d5b81f..64042897 100644
--- a/builtins/test.def
+++ b/builtins/test.def
@@ -100,6 +100,9 @@ Arithmetic binary operators return true if ARG1 is equal, 
not-equal,
 less-than, less-than-or-equal, greater-than, or greater-than-or-equal
 than ARG2.
 
+See bash(1) regarding the handling of parameters (as when they are
+missing).
+
 Exit Status:
 Returns success if EXPR evaluates to true; fails if EXPR evaluates to
 false or an invalid argument is given.
diff --git a/doc/bash.1 b/doc/bash.1
index 4f3af43f..5163c1ff 100644
--- a/doc/bash.1
+++ b/doc/bash.1
@@ -808,6 +808,15 @@ as primaries.
 .IP
 When used with \fB[[\fP, the \fB<\fP and \fB>\fP operators sort
 lexicographically using the current locale.
+.PP
+See the description of the
+.B test
+builtin command in
+.SM
+.B "SHELL BUILTIN COMMANDS"
+below
+regarding the handling of parameters
+(as when they are missing).
 .IP
 When the \fB==\fP and \fB!=\fP operators are used, the string to the
 right of the operator is considered a pattern and matched according
diff --git a/doc/bashref.texi b/doc/bashref.texi
index 62299b10..1afca4c9 100644
--- a/doc/bashref.texi
+++ b/doc/bashref.texi
@@ -8291,6 +8291,10 @@ The @code{test} command uses ASCII ordering.
 Unless otherwise specified, primaries that operate on files follow symbolic
 links and operate on the target of the link, rather than the link itself.
 
+See the description of the @code{test} builtin command in
+@pxref{Bash Builtins} below regarding the handling of parameters
+(as when they are missing).
+
 @table @code
 @item -a @var{file}
 True if @var{file} exists.
-- 
2.51.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]