Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ripsecrets completer #2680

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions completers/ripsecrets_completer/cmd/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)

var rootCmd = &cobra.Command{
Use: "ripsecrets",
Short: "Prevent committing secret keys into your source code",
Long: "https://github.com/sirwart/ripsecrets",
Run: func(cmd *cobra.Command, args []string) {},
}

func Execute() error {
return rootCmd.Execute()
}
func init() {
carapace.Gen(rootCmd).Standalone()

rootCmd.Flags().StringSlice("additional-pattern", []string{}, "Additional regex pattern used to find secrets")
rootCmd.Flags().BoolP("help", "h", false, "Print help")
rootCmd.Flags().Bool("install-pre-commit", false, "Install ripsecrets as a pre-commit hook")
rootCmd.Flags().Bool("only-matching", false, "Print only the matched (non-empty) parts of a matching line")
rootCmd.Flags().Bool("strict-ignore", false, "Respect .secretsignore file even for files passed as arguments")
rootCmd.Flags().BoolP("version", "V", false, "Print version")

carapace.Gen(rootCmd).PositionalAnyCompletion(carapace.ActionFiles())
}
7 changes: 7 additions & 0 deletions completers/ripsecrets_completer/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "github.com/carapace-sh/carapace-bin/completers/ripsecrets_completer/cmd"

func main() {
cmd.Execute()
}
Loading