Created
November 12, 2017 16:23
-
-
Save shigemk2/3a6628ec121ce6c44594691a9be6282b to your computer and use it in GitHub Desktop.
fish shell and manual pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.TH "and" 1 "Mon Nov 13 2017" "Version 2.6.0" "fish" \" -*- nroff -*- | |
.ad l | |
.nh | |
.SH NAME | |
\fBand\fP - conditionally execute a command | |
.PP | |
.SS "Synopsis" | |
.PP | |
.nf | |
COMMAND1; \fBand\fP COMMAND2 | |
.fi | |
.PP | |
.SS "Description" | |
\fCand\fP is used to execute a command if the current exit status (as set by the previous command) is 0\&. | |
.PP | |
\fCand\fP statements may be used as part of the condition in an \fC\fCif\fP\fP or \fC\fCwhile\fP\fP block\&. See the documentation for \fC\fCif\fP\fP and \fC\fCwhile\fP\fP for examples\&. | |
.PP | |
\fCand\fP does not change the current exit status itself, but the command it runs most likely will\&. The exit status of the last foreground command to exit can always be accessed using the \fC$status\fP variable\&. | |
.SS "Example" | |
The following code runs the \fCmake\fP command to build a program\&. If the build succeeds, \fCmake\fP's exit status is 0, and the program is installed\&. If either step fails, the exit status is 1, and \fCmake clean\fP is run, which removes the files created by the build process\&. | |
.PP | |
.PP | |
.nf | |
\fBmake\fP; \fBand\fP \fBmake\fP install; \fBor\fP \fBmake\fP clean | |
.fi | |
.PP | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.TH "and" 1 "Mon Nov 13 2017" "Version 2.6.0" "fish" \" -*- nroff -*- | |
.ad l | |
.nh | |
.SH NAME | |
and \- | |
.SH "and - conditionally execute a command" | |
.PP | |
.SS "Synopsis" | |
.PP | |
.nf | |
COMMAND1; \fBand\fP COMMAND2 | |
.fi | |
.PP | |
.SS "Description" | |
\fCand\fP is used to execute a command if the current exit status (as set by the previous command) is 0\&. | |
.PP | |
\fCand\fP statements may be used as part of the condition in an \fC\fCif\fP\fP or \fC\fCwhile\fP\fP block\&. See the documentation for \fC\fCif\fP\fP and \fC\fCwhile\fP\fP for examples\&. | |
.PP | |
\fCand\fP does not change the current exit status itself, but the command it runs most likely will\&. The exit status of the last foreground command to exit can always be accessed using the \fC$status\fP variable\&. | |
.SS "Example" | |
The following code runs the \fCmake\fP command to build a program\&. If the build succeeds, \fCmake\fP's exit status is 0, and the program is installed\&. If either step fails, the exit status is 1, and \fCmake clean\fP is run, which removes the files created by the build process\&. | |
.PP | |
.PP | |
.nf | |
\fBmake\fP; \fBand\fP \fBmake\fP install; \fBor\fP \fBmake\fP clean | |
.fi | |
.PP | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.TH "and" 1 "Mon Nov 13 2017" "Version 2.6.0" "fish" \" -*- nroff -*- | |
.ad l | |
.nh | |
.SH NAME | |
and \- | |
.SH \fBand\fP - conditionally execute a command | |
.PP | |
.SS "Synopsis" | |
.PP | |
.nf | |
COMMAND1; \fBand\fP COMMAND2 | |
.fi | |
.PP | |
.SS "Description" | |
\fCand\fP is used to execute a command if the current exit status (as set by the previous command) is 0\&. | |
.PP | |
\fCand\fP statements may be used as part of the condition in an \fC\fCif\fP\fP or \fC\fCwhile\fP\fP block\&. See the documentation for \fC\fCif\fP\fP and \fC\fCwhile\fP\fP for examples\&. | |
.PP | |
\fCand\fP does not change the current exit status itself, but the command it runs most likely will\&. The exit status of the last foreground command to exit can always be accessed using the \fC$status\fP variable\&. | |
.SS "Example" | |
The following code runs the \fCmake\fP command to build a program\&. If the build succeeds, \fCmake\fP's exit status is 0, and the program is installed\&. If either step fails, the exit status is 1, and \fCmake clean\fP is run, which removes the files created by the build process\&. | |
.PP | |
.PP | |
.nf | |
\fBmake\fP; \fBand\fP \fBmake\fP install; \fBor\fP \fBmake\fP clean | |
.fi | |
.PP | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.TH "and" 1 "Mon Nov 13 2017" "Version 2.6.0" "fish" \" -*- nroff -*- | |
.ad l | |
.nh | |
.SH NAME | |
and \- | |
.SH and - conditionally execute a command | |
.PP | |
.SS "Synopsis" | |
.PP | |
.nf | |
COMMAND1; \fBand\fP COMMAND2 | |
.fi | |
.PP | |
.SS "Description" | |
\fCand\fP is used to execute a command if the current exit status (as set by the previous command) is 0\&. | |
.PP | |
\fCand\fP statements may be used as part of the condition in an \fC\fCif\fP\fP or \fC\fCwhile\fP\fP block\&. See the documentation for \fC\fCif\fP\fP and \fC\fCwhile\fP\fP for examples\&. | |
.PP | |
\fCand\fP does not change the current exit status itself, but the command it runs most likely will\&. The exit status of the last foreground command to exit can always be accessed using the \fC$status\fP variable\&. | |
.SS "Example" | |
The following code runs the \fCmake\fP command to build a program\&. If the build succeeds, \fCmake\fP's exit status is 0, and the program is installed\&. If either step fails, the exit status is 1, and \fCmake clean\fP is run, which removes the files created by the build process\&. | |
.PP | |
.PP | |
.nf | |
\fBmake\fP; \fBand\fP \fBmake\fP install; \fBor\fP \fBmake\fP clean | |
.fi | |
.PP | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.TH "and" 1 "Mon Nov 13 2017" "Version 2.6.0" "fish" \" -*- nroff -*- | |
.ad l | |
.nh | |
.SH NAME | |
\fBand\fP - conditionally execute a command | |
.PP | |
.SS "Synopsis" | |
.PP | |
.nf | |
COMMAND1; \fBand\fP COMMAND2 | |
.fi | |
.PP | |
.SS "Description" | |
\fCand\fP is used to execute a command if the current exit status (as set by the previous command) is 0\&. | |
.PP | |
\fCand\fP statements may be used as part of the condition in an \fC\fCif\fP\fP or \fC\fCwhile\fP\fP block\&. See the documentation for \fC\fCif\fP\fP and \fC\fCwhile\fP\fP for examples\&. | |
.PP | |
\fCand\fP does not change the current exit status itself, but the command it runs most likely will\&. The exit status of the last foreground command to exit can always be accessed using the \fC$status\fP variable\&. | |
.SS "Example" | |
The following code runs the \fCmake\fP command to build a program\&. If the build succeeds, \fCmake\fP's exit status is 0, and the program is installed\&. If either step fails, the exit status is 1, and \fCmake clean\fP is run, which removes the files created by the build process\&. | |
.PP | |
.PP | |
.nf | |
\fBmake\fP; \fBand\fP \fBmake\fP install; \fBor\fP \fBmake\fP clean | |
.fi | |
.PP | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment