mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 15:37:59 +08: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
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user