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:
torque 2023-04-01 13:05:09 -07:00
parent c3b31b2274
commit 2f591fc02f
Signed by: torque
SSH Key Fingerprint: SHA256:nCrXefBNo6EbjNSQhv0nXmEg/VuNq3sMF5b8zETw3Tk
2 changed files with 0 additions and 7 deletions

View File

@ -178,7 +178,6 @@ pub fn CommandBuilder(comptime UserContext: type) type {
.required = config.required,
.global = config.global,
//
.exposed = config.exposed,
.secret = config.secret,
.nice_type_name = "flag",
};
@ -277,7 +276,6 @@ pub fn CommandBuilder(comptime UserContext: type) type {
.alignment = 0,
}};
if (!param.exposed) continue :paramloop;
while (flag_skip > 0) {
flag_skip -= 1;
continue :paramloop;

View File

@ -148,7 +148,6 @@ pub fn OptionConfig(comptime generics: ParameterGenerics) type {
required: bool = generics.param_type == .Ordinal,
global: bool = false,
exposed: bool = true,
secret: bool = false,
nice_type_name: []const u8 = @typeName(generics.OutputType),
flag_bias: FlagBias = .unbiased,
@ -176,7 +175,6 @@ pub fn FlagConfig(comptime generics: ParameterGenerics) type {
required: bool = false,
global: bool = false,
exposed: bool = true,
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.
/// the converter must have side effects for this option to do anything.
exposed: bool,
/// do not print help for this parameter
secret: bool,
@ -278,7 +275,6 @@ pub fn make_option(comptime generics: ParameterGenerics, comptime opts: OptionCo
.required = opts.required,
.global = opts.global,
//
.exposed = opts.exposed,
.secret = opts.secret,
.nice_type_name = opts.nice_type_name,
.flag_bias = opts.flag_bias,
@ -320,7 +316,6 @@ pub fn make_argument(
.required = opts.required,
.global = opts.global,
//
.exposed = opts.exposed,
.secret = opts.secret,
.nice_type_name = opts.nice_type_name,
.flag_bias = .unbiased,