Skip to content

Commit f00caf5

Browse files
author
Massimiliano Giovagnoli
committed
fix(cmd): correct bind flag to name regex option
Signed-off-by: Massimiliano Giovagnoli <[email protected]>
1 parent 5f60913 commit f00caf5

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

cmd/find/find.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ limitations under the License.
1717
package find
1818

1919
import (
20-
"fmt"
21-
2220
"github.com/pkg/errors"
2321
"github.com/spf13/cobra"
2422

@@ -43,13 +41,7 @@ func NewCmd() *cobra.Command {
4341
RunE: o.Run,
4442
}
4543

46-
var filename string
47-
48-
cmd.Flags().StringVarP(&filename, "name", "n", ".+", "Base of file name (the path with the leading directories removed) exact pattern.")
49-
50-
// As of now only exact glob pattern expressions are allowed. The expression then translated to an exact-match regular expression.
51-
o.FilenameRegexp = fmt.Sprintf("^%s$", filename)
52-
44+
cmd.Flags().StringVarP(&o.FilenameRegexp, "name", "n", ".+", "Base of file name (the path with the leading directories removed) exact pattern.")
5345
cmd.Flags().StringVarP(&o.FileType, "type", "t", "", "The file type")
5446
cmd.Flags().BoolVarP(&o.Verbose, "verbose", "v", false, "Enable verbosity to log all visited HTTP(s) files")
5547
cmd.Flags().BoolVarP(&o.Recursive, "recursive", "r", true, "Whether to examine entries recursing into directories. Disable to behave like GNU find -maxdepth=0 option.")

0 commit comments

Comments
 (0)