]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
commands: Adjust completions
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 11 Apr 2024 12:40:34 +0000 (14:40 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 11 Apr 2024 13:34:26 +0000 (15:34 +0200)
commands/new.go

index 144da7cd74d7ccefbc2ead8ec60e2c581abf9822..045a920a38f22897de3f997876072b3c208fc1b0 100644 (file)
@@ -24,7 +24,6 @@ import (
        "github.com/gohugoio/hugo/config"
        "github.com/gohugoio/hugo/create"
        "github.com/gohugoio/hugo/create/skeletons"
-       "github.com/gohugoio/hugo/resources/kinds"
        "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
                                        }
                                        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.RegisterFlagCompletionFunc("editor", cobra.NoFileCompletions)
                                        cmd.Flags().BoolVarP(&force, "force", "f", false, "overwrite file if it already exists")