mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00:00
test: note that the square bracket form is available
As requested in https://github.com/fish-shell/fish-shell/issues/1850
This commit is contained in:
parent
5f2ea007a5
commit
b9ff17f33c
1 changed files with 3 additions and 0 deletions
|
@ -3,12 +3,15 @@
|
||||||
\subsection test-synopsis Synopsis
|
\subsection test-synopsis Synopsis
|
||||||
\fish{synopsis}
|
\fish{synopsis}
|
||||||
test [EXPRESSION]
|
test [EXPRESSION]
|
||||||
|
[ [EXPRESSION] ]
|
||||||
\endfish
|
\endfish
|
||||||
|
|
||||||
\subsection test-description Description
|
\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.
|
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:
|
The following operators are available to examine files and directories:
|
||||||
|
|
||||||
- `-b FILE` returns true if `FILE` is a block device.
|
- `-b FILE` returns true if `FILE` is a block device.
|
||||||
|
|
Loading…
Reference in a new issue