adsr/mle

config option to switch between ripgrep and silver searcher?

communistkiro opened this issue · 2 comments

I recently found out ripgrep was faster than the silver-searcher, although I never used the latter, just had it installed-, I found out the mle used it to list hidden things because when opened in a directory it says
[Command failed: ag --hidden -g ""]
rg is faster and can provide the same functionality, as well as these alternatives although they are non recursive):
ls -p | pcre2grep -v '/$'
ls -p | pcregrep '/$'
fd -uu -i -t f -d 1
ls -p | sed -r '/\/$/d' (slowest)

adsr commented

Hi @communistkiro. You can configure mle to use ripgrep like so:

mle -K 'custom_kmap,,1' -k 'cmd_grep,M-q,rg --no-config %s 2>/dev/null' -n custom_kmap

You can specify these switches in your mlerc instead of on the command line to make the configuration permanent.

I've never gotten the mlerc file to get read, as if, at least never have I had my keybindings work.
Semicolons cause /root/.mlerc: 1: Syntax error: ";" unexpected, so I use #s.
Finally, I was talking about about cmd_fsearch, not cmd_grep.