Skip to content

Commit

Permalink
commands: Re-introduce the -f shorthand for hugo new site
Browse files Browse the repository at this point in the history
Fixes #11015
  • Loading branch information
bep committed May 27, 2023
1 parent f86b5f7 commit 901cd97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion commands/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion testscripts/commands/new.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 901cd97

Please sign in to comment.