mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-10 19:54:08 +02:00
Change most global flags into local ones
This is to ensure that only the relevant command-line flags for a certain Hugo subcommand is shown to the end user, reducing clutter and improving user experience. Fixes #1624 - CLI UX: Flags shouldn't be global
This commit is contained in:
@@ -74,6 +74,7 @@ func init() {
|
||||
convertCmd.AddCommand(toTOMLCmd)
|
||||
convertCmd.AddCommand(toYAMLCmd)
|
||||
convertCmd.PersistentFlags().StringVarP(&outputDir, "output", "o", "", "filesystem path to write files to")
|
||||
convertCmd.PersistentFlags().StringVarP(&Source, "source", "s", "", "filesystem path to read files relative from")
|
||||
convertCmd.PersistentFlags().BoolVar(&unsafe, "unsafe", false, "enable less safe operations, please backup first")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user