Handbook
Glossary
(parse-options) ( options command-line -- arguments )
Parsing command-line arguments
Prev:
parse-options ( options -- arguments )
Vocabulary
command-line
.
parser
Inputs
options
an
object
command-line
an
object
Outputs
arguments
an
object
Definition
USING:
command-line.parser.private
continuations
kernel
namespaces
sequences
;
IN:
command-line.parser
:
(parse-options)
( options command-line -- arguments )
[
[
>option
]
map
]
dip
over
default-options
[
default-help?
get
[
[
HELP
prefix
]
dip
]
when
[
parse-arguments
]
pick
[
usage-error
]
curry
[
[
print-help?
get
]
]
dip
[
when
]
curry
compose
[
[
default-help?
get
]
]
dip
[
when
]
curry
compose
finally
]
with-variables
;