|
@@ -60,6 +60,7 @@ function latest ()
|
|
|
MTIME=${MTIME:-7}
|
|
|
WHERE=${WHERE:-.}
|
|
|
TIMEOUT=30 # max run at 30 seconds
|
|
|
+ FIND_REGEX="-regex" # case sensitive by default
|
|
|
which timeout > /dev/null || die "Timeout not found"
|
|
|
|
|
|
# define filenames/paths to be ignored
|
|
@@ -186,6 +187,7 @@ EOF2
|
|
|
REGEX="${1}"; { { [[ $# -gt 0 ]] && shift; } || die '--grep requires an argument'; } ;;
|
|
|
-i|--ignore-case)
|
|
|
shift;
|
|
|
+ FIND_REGEX="-iregex"
|
|
|
GREPFLAGS+=("-i");;
|
|
|
-l|--files-with-matches)
|
|
|
shift;
|
|
@@ -268,7 +270,7 @@ EOF2
|
|
|
-mtime -"${MTIME}"\
|
|
|
\
|
|
|
$(: COMMENT restrict to files that match "$WHAT" in full pat) \
|
|
|
- -regex ".*${WHAT}.*" \
|
|
|
+ ${FIND_REGEX} ".*${WHAT}.*" \
|
|
|
\
|
|
|
$(: COMMENT run grep if requested: "${GREPFLAGS[*]}") \
|
|
|
${GREPFLAGS[*]} && \
|