diff --git a/main.go b/main.go index f16a63f..35922ba 100644 --- a/main.go +++ b/main.go @@ -25,6 +25,11 @@ var rootCmd = &cobra.Command{ It allows users to easily create and manage .gitignore files for various programming languages and frameworks. You may also list available templates and generate .gitignore files based on those templates.`, PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { + if strings.HasPrefix(cmd.CommandPath(), "exclude completion") || + strings.HasPrefix(cmd.CommandPath(), "exclude help") { + return nil + } + client, err := gogi.NewHTTPClient() if err != nil { return fmt.Errorf("error creating HTTP client: %w", err)