mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
commands: Adjust completions
This commit is contained in:
parent
a67650b6f7
commit
38f68cd162
1 changed files with 0 additions and 2 deletions
|
@ -24,7 +24,6 @@ import (
|
||||||
"github.com/gohugoio/hugo/config"
|
"github.com/gohugoio/hugo/config"
|
||||||
"github.com/gohugoio/hugo/create"
|
"github.com/gohugoio/hugo/create"
|
||||||
"github.com/gohugoio/hugo/create/skeletons"
|
"github.com/gohugoio/hugo/create/skeletons"
|
||||||
"github.com/gohugoio/hugo/resources/kinds"
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -68,7 +67,6 @@ Ensure you run this within the root directory of your site.`,
|
||||||
return []string{}, cobra.ShellCompDirectiveNoFileComp | cobra.ShellCompDirectiveFilterDirs
|
return []string{}, cobra.ShellCompDirectiveNoFileComp | cobra.ShellCompDirectiveFilterDirs
|
||||||
}
|
}
|
||||||
cmd.Flags().StringVarP(&contentType, "kind", "k", "", "content type to create")
|
cmd.Flags().StringVarP(&contentType, "kind", "k", "", "content type to create")
|
||||||
_ = cmd.RegisterFlagCompletionFunc("kind", cobra.FixedCompletions(kinds.AllKindsInPages, cobra.ShellCompDirectiveNoFileComp))
|
|
||||||
cmd.Flags().String("editor", "", "edit new content with this editor, if provided")
|
cmd.Flags().String("editor", "", "edit new content with this editor, if provided")
|
||||||
_ = cmd.RegisterFlagCompletionFunc("editor", cobra.NoFileCompletions)
|
_ = cmd.RegisterFlagCompletionFunc("editor", cobra.NoFileCompletions)
|
||||||
cmd.Flags().BoolVarP(&force, "force", "f", false, "overwrite file if it already exists")
|
cmd.Flags().BoolVarP(&force, "force", "f", false, "overwrite file if it already exists")
|
||||||
|
|
Loading…
Reference in a new issue