Home > @rushstack/ts-command-line > CommandLineParameterProvider > defineCommandLineRemainder
Defines a rule that captures any remaining command line arguments after the recognized portion.
defineCommandLineRemainder(definition: ICommandLineRemainderDefinition): CommandLineRemainder;
This feature is useful for commands that pass their arguments along to an external tool, relying on that tool to perform validation. (It could also be used to parse parameters without any validation or documentation, but that is not recommended.)
Example of capturing the remainder after an optional flag parameter.
example-tool --my-flag this is the remainder
In the "--help" documentation, the remainder rule will be represented as "...".