Browse Source

todolist: fix ug command

master
Maxim Likhachev 3 years ago
parent
commit
1356875bde
  1. 6
      scripts/todolist

6
scripts/todolist

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

Loading…
Cancel
Save