diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-05-27 15:08:11 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-05-27 16:56:54 +0200 |
commit | 901cd970dbeae4b69b2dae5fc3a3482a38117258 (patch) | |
tree | adb07417532db66b1e641f52d4ce8b1b9dd036b5 | |
parent | f86b5f70a60fc3793bc826f2ccd8dcdd62e26b51 (diff) |
commands: Re-introduce the -f shorthand for hugo new site
Fixes #11015
-rw-r--r-- | commands/new.go | 2 | ||||
-rw-r--r-- | testscripts/commands/new.txt | 2 |
2 files changed, 2 insertions, 2 deletions
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 |