command: remove exposed option
This wasn't fully implemented, and I don't actually think there's a real reason for it to exist. It was cargo culted over from my own thinking about click functionality, but API differences mean it just isn't really useful here.
This commit is contained in:
parent
c3b31b2274
commit
2f591fc02f
@ -178,7 +178,6 @@ pub fn CommandBuilder(comptime UserContext: type) type {
|
|||||||
.required = config.required,
|
.required = config.required,
|
||||||
.global = config.global,
|
.global = config.global,
|
||||||
//
|
//
|
||||||
.exposed = config.exposed,
|
|
||||||
.secret = config.secret,
|
.secret = config.secret,
|
||||||
.nice_type_name = "flag",
|
.nice_type_name = "flag",
|
||||||
};
|
};
|
||||||
@ -277,7 +276,6 @@ pub fn CommandBuilder(comptime UserContext: type) type {
|
|||||||
.alignment = 0,
|
.alignment = 0,
|
||||||
}};
|
}};
|
||||||
|
|
||||||
if (!param.exposed) continue :paramloop;
|
|
||||||
while (flag_skip > 0) {
|
while (flag_skip > 0) {
|
||||||
flag_skip -= 1;
|
flag_skip -= 1;
|
||||||
continue :paramloop;
|
continue :paramloop;
|
||||||
|
@ -148,7 +148,6 @@ pub fn OptionConfig(comptime generics: ParameterGenerics) type {
|
|||||||
required: bool = generics.param_type == .Ordinal,
|
required: bool = generics.param_type == .Ordinal,
|
||||||
global: bool = false,
|
global: bool = false,
|
||||||
|
|
||||||
exposed: bool = true,
|
|
||||||
secret: bool = false,
|
secret: bool = false,
|
||||||
nice_type_name: []const u8 = @typeName(generics.OutputType),
|
nice_type_name: []const u8 = @typeName(generics.OutputType),
|
||||||
flag_bias: FlagBias = .unbiased,
|
flag_bias: FlagBias = .unbiased,
|
||||||
@ -176,7 +175,6 @@ pub fn FlagConfig(comptime generics: ParameterGenerics) type {
|
|||||||
required: bool = false,
|
required: bool = false,
|
||||||
global: bool = false,
|
global: bool = false,
|
||||||
|
|
||||||
exposed: bool = true,
|
|
||||||
secret: bool = false,
|
secret: bool = false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -212,7 +210,6 @@ fn OptionType(comptime generics: ParameterGenerics) type {
|
|||||||
|
|
||||||
/// if false, do not expose the resulting value in the output type.
|
/// if false, do not expose the resulting value in the output type.
|
||||||
/// the converter must have side effects for this option to do anything.
|
/// the converter must have side effects for this option to do anything.
|
||||||
exposed: bool,
|
|
||||||
/// do not print help for this parameter
|
/// do not print help for this parameter
|
||||||
secret: bool,
|
secret: bool,
|
||||||
|
|
||||||
@ -278,7 +275,6 @@ pub fn make_option(comptime generics: ParameterGenerics, comptime opts: OptionCo
|
|||||||
.required = opts.required,
|
.required = opts.required,
|
||||||
.global = opts.global,
|
.global = opts.global,
|
||||||
//
|
//
|
||||||
.exposed = opts.exposed,
|
|
||||||
.secret = opts.secret,
|
.secret = opts.secret,
|
||||||
.nice_type_name = opts.nice_type_name,
|
.nice_type_name = opts.nice_type_name,
|
||||||
.flag_bias = opts.flag_bias,
|
.flag_bias = opts.flag_bias,
|
||||||
@ -320,7 +316,6 @@ pub fn make_argument(
|
|||||||
.required = opts.required,
|
.required = opts.required,
|
||||||
.global = opts.global,
|
.global = opts.global,
|
||||||
//
|
//
|
||||||
.exposed = opts.exposed,
|
|
||||||
.secret = opts.secret,
|
.secret = opts.secret,
|
||||||
.nice_type_name = opts.nice_type_name,
|
.nice_type_name = opts.nice_type_name,
|
||||||
.flag_bias = .unbiased,
|
.flag_bias = .unbiased,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user