fisher/man/man1/wait.1

106 lines
2.5 KiB
Groff

.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "WAIT" "1" "February 2016" "" "fisherman"
.
.SH "NAME"
\fBwait\fR \- Run commands and wait with a spin
.
.SH "SYNOPSIS"
\fBwait\fR \fIcommands\fR [\fB\-\-spin\fR=\fIarc\fR|\fIstar\fR|\fIpipe\fR|\fIball\fR|\fIflip\fR|\fImixer\fR|\fIcaret\fR|\fIbar1~3\fR]
.
.br
\fBwait\fR \fIcommands\fR [\fB\-\-time\fR=interval] [\fB\-\-log\fR=file] [\fB\-\-format\fR=format] [\fB\-\-help\fR]
.
.SH "DESCRIPTION"
Run \fIcommands\fR in the background and wait until the job has finished\. Any output to standard error indicates \fBwait\fR to return \fB1\fR\. While it waits, a customizable spinner is displayed in the command line\.
.
.SH "OPTIONS"
.
.TP
\fB\-s \-\-spin=style|string\fR
Set the spinner style\. See \fBStyles\fR for styles and details on how to customize the spinner tokens\.
.
.TP
\fB\-t \-\-time=interval\fR
Set spinner transition time delay in \fIseconds\fR\. A large value will refresh the spinner more slowly\. You may use decimal numbers to represent smaller numbers\. The default interval is \fB0\.02\fR\.
.
.TP
\fB\-l \-\-log=file\fR
Write the standard error output to a given \fIfile\fR\.
.
.TP
\fB\-f \-\-format=format\fR
Use the given \fIformat\fR to display the spinner\. The default format is \fB"\er@"\fR where \fB@\fR represents the spinner token and \fB\er\fR a carriage return, used to refresh (erase) the line\.
.
.TP
\fB\-h \-\-help\fR
Show usage help\.
.
.SH "STYLES"
.
.IP "\(bu" 4
arc, star, pipe, ball, flip, mixer, caret
.
.IP "\(bu" 4
bar1~3
.
.IP "" 0
.
.P
If no style is given, \fBmixer\fR is used by default\. If you don\'t want to display any spinners, use \fB\-\-spin=""\fR\.
.
.SS "CUSTOMIZATION"
In addition to the default styles, you can specify a string of character tokens to be used each per spinner refresh cycle\.
.
.P
For example \fB\-\-spin=12345\fR will display the numbers from 1 to 5, and \fB\-\-spin=\. \-\-format=@\fR an increasing sequence of dots\.
.
.SS "PROGRESS BARS"
Display a progress bar with a percent indicator using \fB\-\-spin=bar1~3\fR:
.
.IP "\(bu" 4
bar1: [=====] \fInum\fR%
.
.IP "\(bu" 4
bar2: [#####] \fInum\fR%
.
.IP "\(bu" 4
bar3: \.\.\.\.\.\.\. \fInum\fR%
.
.IP "" 0
.
.SH "EXAMPLES"
Run commands in the background and display a spinning pipe while until finished\.
.
.IP "" 4
.
.nf
wait \-\-spin=pipe "curl \-sS $URL"
.
.fi
.
.IP "" 0
.
.P
Write the standard error output to \fIdebug\.txt\fR\.
.
.IP "" 4
.
.nf
if not wait \-\-spin=pipe \-\-log=debug\.txt "curl \-sS $URL"
return 1
end
.
.fi
.
.IP "" 0
.
.SH "SEE ALSO"
sleep(1)
.
.br