feat(alias-finder): use ripgrep if possible (#13043)

Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
This commit is contained in:
Roeniss MoonandCarlo Sala authored and GitHub committed 2025-07-21 18:58:09 +02:00
1 parent e3e468d138
commit 537807c863
2 files changed
+10 -4

No files matched your search

+5 -1
View File
@@ -43,7 +43,11 @@ alias-finder() {
filter="^'?.{1,$((cmdLen - 1))}'?=" # some aliases is surrounded by single quotes
fi
alias | grep -E "$filter" | grep -E "=$finder"
if (( $+commands[rg] )); then
alias | rg "$filter" | rg "=$finder"
else
alias | grep -E "$filter" | grep -E "=$finder"
fi
if [[ $exact == true ]]; then
break # because exact case is only one