Add ripgrep support to tag

This commit is contained in:
Tony Blyler 2023-06-13 09:55:08 -04:00
parent 4f062c3706
commit 800c69107c

View file

@ -1,5 +1,11 @@
if command -v tag &> /dev/null; then
export TAG_SEARCH_PROG=ag # replace with rg for ripgrep
tag() { command tag "$@"; source ${TAG_ALIAS_FILE:-/tmp/tag_aliases} 2>/dev/null }
alias ag=tag # replace with rg for ripgrep
if command -v ag &> /dev/null; then
tag() { export TAG_SEARCH_PROG=ag; command tag "$@"; source ${TAG_ALIAS_FILE:-/tmp/tag_aliases} 2>/dev/null }
alias ag=tag
fi
if command -v rg &> /dev/null; then
trg() { export TAG_SEARCH_PROG=rg; command tag "$@"; source ${TAG_ALIAS_FILE:-/tmp/tag_aliases} 2>/dev/null }
alias rg=trg
fi
fi