mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 06:30:33 +03: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:
parent
c9526f6e3f
commit
00d04774f0
7 changed files with 130 additions and 115 deletions
|
@ -25,6 +25,7 @@ import (
|
|||
func init() {
|
||||
listCmd.AddCommand(listDraftsCmd)
|
||||
listCmd.AddCommand(listFutureCmd)
|
||||
listCmd.PersistentFlags().StringVarP(&Source, "source", "s", "", "filesystem path to read files relative from")
|
||||
}
|
||||
|
||||
var listCmd = &cobra.Command{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue