|
|
@ -4,14 +4,16 @@ |
|
|
|
|
|
|
|
|
|
|
|
[ -n "$1" ] && cd "$1" |
|
|
|
[ -n "$1" ] && cd "$1" |
|
|
|
|
|
|
|
|
|
|
|
if ! command -v rg &>/dev/null; then |
|
|
|
if command -v ugrep &>/dev/null; then |
|
|
|
GREP_CMD="grep -R -n" |
|
|
|
GREP_CMD="ugrep -R -n" |
|
|
|
else |
|
|
|
elif command -v rg &>/dev/null; then |
|
|
|
GREP_CMD="rg" |
|
|
|
GREP_CMD="rg" |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
GREP_CMD="grep -R -n" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if git rev-parse --show-toplevel &>/dev/null; then |
|
|
|
if git rev-parse --show-toplevel &>/dev/null; then |
|
|
|
$GREP_CMD "^[[:space:]]*[#/\";-]*[[:space:]]*TODO:" . \ |
|
|
|
$GREP_CMD "^[[:space:]]*[#/\";-]*[[:space:]]*TODO:" . 2>&- \ |
|
|
|
| expand \ |
|
|
|
| expand \ |
|
|
|
| sed -E 's/([[:digit:]]):/\1:@@ /' \ |
|
|
|
| sed -E 's/([[:digit:]]):/\1:@@ /' \ |
|
|
|
| tr -s ' ' \ |
|
|
|
| tr -s ' ' \ |
|
|
|