You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
. \" generated with Ronn/v0.7.3
. \" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GETOPTS" "1" "March 2016" "" "fisherman"
.
.SH "NAME"
\fB getopts\fR \- Command line options parser
.
.SH "SYNOPSIS"
getopts \fI options\fR \. \. \.
.
.br
.
.SH "DESCRIPTION"
\fB Getopts\fR is a command line options parser for fish\.
.
.SH "USAGE"
Study the output of getopts in the following example
.
.IP "" 4
.
.nf
getopts \- ab1 \- \- foo=bar baz
.
.fi
.
.IP "" 0
.
.IP "" 4
.
.nf
a
b 1
foo bar
_ baz
.
.fi
.
.IP "" 0
.
.P
The items on the left are the command option \fI keys\fR \. The items on the right are the option \fI values\fR \. The underscore \fB _\fR character is the default key for bare arguments\.
.
.IP "" 4
.
.nf
getopts \- ab1 \- \- foo=bar baz | while read \- l key option
switch $key
case _
case a
case b
case foo
end
end
.
.fi
.
.IP "" 0
.
.SH "NOTES"
.
.IP "\(bu" 4
A double dash, \fB \- \- \fR , marks the end of options\. Arguments after this sequence are placed in the default underscore key, \fB _\fR \.
.
.IP "" 0