diff --git a/commands/new.go b/commands/new.go index d021be027..fc9a0bd8c 100644 --- a/commands/new.go +++ b/commands/new.go @@ -148,7 +148,7 @@ Use ` + "`hugo new [contentPath]`" + ` to create new content.`, return nil }, withc: func(cmd *cobra.Command) { - cmd.Flags().BoolVar(&force, "force", false, "init inside non-empty directory") + cmd.Flags().BoolVarP(&force, "force", "f", false, "init inside non-empty directory") }, }, &simpleCommand{ diff --git a/testscripts/commands/new.txt b/testscripts/commands/new.txt index 11fe753b9..aeebba66d 100644 --- a/testscripts/commands/new.txt +++ b/testscripts/commands/new.txt @@ -2,7 +2,7 @@ hugo new site -h stdout 'Create a new site in the provided directory' -hugo new site mysite +hugo new site mysite -f stdout 'Congratulations! Your new Hugo site is created in' cd mysite checkfile hugo.toml