diff --git a/main.go b/main.go index cf23f1f..12b20dc 100644 --- a/main.go +++ b/main.go @@ -48,7 +48,7 @@ which can be repeated multiple times. -e specifies a regular expression and -Q a fixed pattern. When using either flag, any non-flag arguments are treated as paths to scan. -Search defaults to case-sensitive but the -I flag may be passed to make regular +Search defaults to case-sensitive but the -i flag may be passed to make regular expression searches case-insensitive. Alternatively, the "(?i)" construct may be added to a regular expression to make that specific expression case insensitive. Fixed pattern matches are always case-sensitive.`, @@ -70,8 +70,8 @@ var ( func init() { rootCmd.Flags().StringSliceVarP(&searchRegexp, "grep", "e", nil, "pattern to match (regular expression)") rootCmd.Flags().StringSliceVarP(&searchFixed, "fixed", "Q", nil, "pattern to match (fixed string)") - rootCmd.Flags().StringSliceVarP(&ignoreList, "ignore", "i", []string{".git"}, "files/directories to ignore") - rootCmd.Flags().BoolVarP(&ignoreCase, "ignore-case", "I", false, "make all searches case insensitive") + rootCmd.Flags().StringSliceVarP(&ignoreList, "exclude", "x", []string{".git"}, "files/directories to exclude") + rootCmd.Flags().BoolVarP(&ignoreCase, "ignore-case", "i", false, "make all searches case insensitive") } func run(c *cobra.Command, args []string) error {