Edit

Share via


CommandLineBuilderExtensions.EnablePosixBundling Method

Definition

Enables the parser to recognize and expand POSIX-style bundled options.

public static System.CommandLine.Builder.CommandLineBuilder EnablePosixBundling (this System.CommandLine.Builder.CommandLineBuilder builder, bool value = true);
static member EnablePosixBundling : System.CommandLine.Builder.CommandLineBuilder * bool -> System.CommandLine.Builder.CommandLineBuilder
<Extension()>
Public Function EnablePosixBundling (builder As CommandLineBuilder, Optional value As Boolean = true) As CommandLineBuilder

Parameters

builder
CommandLineBuilder

A command line builder.

value
Boolean

If set to true, then POSIX bundles are parsed. ; otherwise, false.

Returns

The same instance of CommandLineBuilder.

Remarks

POSIX conventions recommend that single-character options be allowed to be specified together after a single - prefix. When EnablePosixBundling(CommandLineBuilder, Boolean) is set to true, the following command lines are equivalent:

> myapp -a -b -c
> myapp -abc

If an argument is provided after an option bundle, it applies to the last option in the bundle. When EnablePosixBundling(CommandLineBuilder, Boolean) is set to true, all of the following command lines are equivalent:

> myapp -a -b -c arg
> myapp -abc arg
> myapp -abcarg

Applies to