getflags: extract all flags

Description Usage Arguments Value Methods (by class) See Also

Description

This method can be used to extract the flag values of either a single argument or all arguments provided to a parser. This interface is primarily thought to be useful for testing and debugging purposes.

Usage

1
2
3
4
5
6
7
getflags(x, ...)

## S3 method for class 'cmd_arg'
getflags(x, ...)

## S3 method for class 'cmd_parser'
getflags(x, ...)

Arguments

x

an object of either class cmd_arg or cmd_parser

...

further arguments passed the specific method

Value

If x is a single argument, a character vector of argument names if x is a cmd_parser, a list is returned with plausible entries "flags", "positional" and "named" for flag, positional and named arguments respectively.

Methods (by class)

See Also

Other parsers: getlflag(), getsflag()


Bijaelo/cmdline.arguments documentation built on June 12, 2021, 1:42 p.m.