-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Map short flags to their long versions (e.g., -f maps to --file). Not sure if we want to do this, but opening this up as it may come up.
Maybe something like this:
root := &cli.Command{
Flags: cli.FlagsFunc(func(f *flag.FlagSet) {
f.String("file", "", "path to the tasks file")
}),
FlagsMetadata: []cli.FlagMetadata{
{Name: "file", Required: true, Short: "f"},
},
}This would mean all forms would be supported:
-f file.txt
--f file.txt
-file file.txt
--file file.txtThen, we need to decide on how to render the usage information:
Usage:
app [command] [flags]
Flags:
-f, --file string Path to config file (default "config.yaml")Metadata
Metadata
Assignees
Labels
No labels