mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
parent
b61c4f1cbc
commit
ff66d2f3c1
1 changed files with 16 additions and 0 deletions
|
@ -139,6 +139,22 @@ if test $status -eq 0
|
||||||
end
|
end
|
||||||
\endfish
|
\endfish
|
||||||
|
|
||||||
|
The previous test can likewise be inverted:
|
||||||
|
|
||||||
|
\fish
|
||||||
|
if test ! $status -eq 0
|
||||||
|
echo "Previous command failed"
|
||||||
|
end
|
||||||
|
\endfish
|
||||||
|
|
||||||
|
which is logically equivalent to the following:
|
||||||
|
|
||||||
|
\fish
|
||||||
|
if test $status -ne 0
|
||||||
|
echo "Previous command failed"
|
||||||
|
end
|
||||||
|
\endfish
|
||||||
|
|
||||||
\subsection test-standards Standards
|
\subsection test-standards Standards
|
||||||
|
|
||||||
`test` implements a subset of the <a href="http://www.unix.com/man-page/POSIX/1/test/">IEEE Std 1003.1-2008 (POSIX.1) standard</a>. The following exceptions apply:
|
`test` implements a subset of the <a href="http://www.unix.com/man-page/POSIX/1/test/">IEEE Std 1003.1-2008 (POSIX.1) standard</a>. The following exceptions apply:
|
||||||
|
|
Loading…
Reference in a new issue