-
Notifications
You must be signed in to change notification settings - Fork 18
cargs.q
Jas edited this page Nov 5, 2019
·
1 revision
The functions in this namespace provide additional features on top of the built-in .Q.opt
functionality. The additional features are:
- Support for parameters specified with double dash (e.g.
--parameter
) by removing the additional dash - All values in returned dictionary are string (
10h
) with multi-argument values joined with spaces between them
Provides the additional parsing features for user-specified command line arguments (via .z.x
)
> rlwrap $QHOME/l64/q src/require.q -p 12345 -g 1 -multiArg a b c --singleArg abc
...
q) .cargs.get[]
multiArg | "a b c"
singleArg| "abc"
q) type each .cargs.get[]
multiArg | 10
singleArg| 10
Provides the additional parsing features for all command line arguments (via .z.X
)
> rlwrap $QHOME/l64/q src/require.q -p 12345 -g 1 -multiArg a b c --singleArg abc
...
q) .cargs.getWithInternal[]
p | "12345"
g | ,"1"
multiArg | "a b c"
singleArg| "abc"
Copyright (C) Sport Trades Ltd 2017 - 2020, John Keys and Jaskirat Rajasansir 2020 - 2024