Change a couple of flags, -i for case
This commit is contained in:
parent
2bbfc3bc30
commit
b438aef169
6
main.go
6
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 {
|
||||
|
|
Loading…
Reference in New Issue