aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src
diff options
context:
space:
mode:
authorGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2014-12-28 19:03:26 +0800
committerGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2014-12-28 19:03:26 +0800
commitb9ff17f33c60c4086c7a655f853cc33670057d4e (patch)
tree19162400c67e697d53a25f77def132eb3da9a1a4 /doc_src
parent5f2ea007a5d1e5934499c2d0b249c69bbb216c6a (diff)
test: note that the square bracket form is available
Diffstat (limited to 'doc_src')
-rw-r--r--doc_src/test.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc_src/test.txt b/doc_src/test.txt
index 632e7901..64a6f471 100644
--- a/doc_src/test.txt
+++ b/doc_src/test.txt
@@ -3,12 +3,15 @@
\subsection test-synopsis Synopsis
\fish{synopsis}
test [EXPRESSION]
+[ [EXPRESSION] ]
\endfish
\subsection test-description Description
Tests the expression given and sets the exit status to 0 if true, and 1 if false. An expression is made up of one or more operators and their arguments.
+The first form (`test`) is preferred. For compatibility with other shells, the second form is available: a matching pair of square brackets (`[ [EXPRESSION ] ]`).
+
The following operators are available to examine files and directories:
- `-b FILE` returns true if `FILE` is a block device.