opt_style: Get or set the optigrab style

Description Usage Arguments Value flag_test flag_to_name name_to_flag See Also Examples

Description

Get or sets the optigrab style

Usage

1
opt_style(style)

Arguments

style

named list; containing the following functions: flag_test, flag_to_name and name_to_flag

If style is not specified, opt_style gets the current optigrab style. If style is provided, it must be a named list containing three functions flag_test, flag_to_name and name_to_flag.

Value

If style is not provided, returns a list of styles, otherwise used for the side-effect of setting the option

flag_test

Accepts a character vector and returns a logical vector indicating whether the elements are flags.

flag_to_name

Accepts a character vector of flags and turns them into variable names, usually by stripping delimiters that indicate that they are flags

name_to_flag

Accepts a character vector of names and transforms them into the flags that would appear on the command line. This is used by opt_grab().

See Also

gnu_style, java_style or ms_style

Examples

1
2
3
4
5

optigrab documentation built on May 2, 2019, 2:10 a.m.