Skip to main content

Interface: ScannerConfiguration

Configuration for controlling the behavior of the command and argument scanners.

Properties

allowArgumentEscapeSequence

readonly allowArgumentEscapeSequence: boolean

If true, when scanning inputs for a command will treat -- as an escape sequence. This will force the scanner to treat all remaining inputs as arguments.

Example for false

$ cli --foo -- --bar
# { foo: true, bar: true }, ["--"]

Example for true

$ cli --foo -- --bar
# { foo: true }, ["--bar"]

Default value is false

Defined in

packages/core/src/config.ts:74


caseStyle

readonly caseStyle: ScannerCaseStyle

Case style configuration for scanning route and flag names.

Default value is original

Defined in

packages/core/src/config.ts:55


distanceOptions

readonly distanceOptions: DamerauLevenshteinOptions

Options used when calculating distance for alternative inputs ("did you mean?").

Default value is equivalent to the empirically determined values used by git:

{
"threshold": 7,
"weights": {
"insertion": 1,
"deletion": 3,
"substitution": 2,
"transposition": 0
}
}

Defined in

packages/core/src/config.ts:91