mirror of
https://github.com/rsteube/carapace-bin.git
synced 2025-05-23 08:01:15 +00:00
22 lines
745 B
Go
22 lines
745 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/rsteube/carapace"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var bashCompletionCmd = &cobra.Command{
|
|
Use: "bash-completion",
|
|
Short: "Output command line shell completion setup scripts",
|
|
Run: func(cmd *cobra.Command, args []string) {},
|
|
}
|
|
|
|
func init() {
|
|
carapace.Gen(bashCompletionCmd).Standalone()
|
|
|
|
bashCompletionCmd.Flags().BoolP("help", "h", false, "Print this usage information.")
|
|
bashCompletionCmd.Flags().Bool("no-overwrite", false, "Causes the given shell completion setup script not to be overwritten if it already exists.")
|
|
bashCompletionCmd.Flags().Bool("overwrite", false, "Causes the given shell completion setup script to be overwritten if it already exists.")
|
|
rootCmd.AddCommand(bashCompletionCmd)
|
|
}
|