-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Description
This is a great lib btw been liking working with it while building my CLI, have one question i'm going to be creating multiple subcommands and have got that working well no issue, however since .target only accepts either subommand or action im not sure of how to have a default command when the user just runs the cli ie blinkx in this case without running the subcommand
ie without the subcommand the user recieves this error ERROR: command 'blinkx' requires subcommand
id like to be able to either surface up the default help or something else by default is.
const app = CliBuilder.App{
.command = CliBuilder.Command{
.name = "blinkx",
.options = &.{
// Might be better to just have this as a defautl value
.{
.long_name = "apikey",
.short_alias = 'a',
.help = "apikey to display",
.envvar = "BLINKX_APIKEY",
.required = true,
.value_ref = r.mkRef(&model.config.apikey),
},
},
.target = CliBuilder.CommandTarget{
.subcommands = &.{try content.contentCommand(&r)},
},
},
};Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels