Add shorthand options to flags. For example,
diceware-cli generate --size=4 --copy
It could be shortened to:
diceware-cli generate -s=4 -c
To achieve that, the Flags method should be updated to use the suffixed P version.
-- generateCmd.Flags().StringVar(&dicewareConfig.Lang, "lang", "en", "password language\n available langs: en, pt")
++ generateCmd.Flags().StringVarP(&dicewareConfig.Lang, "lang", "l", "en", "password language\n available langs: en, pt")
Add shorthand options to flags. For example,
It could be shortened to:
To achieve that, the Flags method should be updated to use the suffixed
Pversion.