Handbook
Glossary
command-line-options ( args -- args' )
Vocabulary
command-line
Inputs
args
a
sequence
Outputs
args'
a
sequence
Word description
Used to pop off command-line arguments specified by a '
-
' (dash) prefix, setting them as string variables with optional values.
Definition
USING:
kernel
sequences
splitting
;
IN:
command-line
:
command-line-options
( args -- args' )
[
dup
?first
"-"
?head
]
[
[
45
=
]
trim-head
param
rest
]
while
drop
;