dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit e2c5ff72663031308d07e680f029735a1fd2e5f7
parent b0acdc87266f8380fdf612fadf654cf45c03eed8
Author: Anders Damsgaard <andersd@riseup.net>
Date:   Thu, 19 Oct 2017 11:40:45 -0400

use ripgrep over the_silver_searcher if available

Diffstat:
Mlinks/.zshrc | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/links/.zshrc b/links/.zshrc @@ -319,8 +319,17 @@ if _has fzf; then export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" export FZF_ALT_C_COMMAND="$FZF_DEFAULT_COMMAND" + # use ripgrep if available + if _has rg; then + # --files: List files that would be searched but do not search + # --no-ignore: Do not respect .gitignore, etc... + # --hidden: Search hidden files and folders + # --follow: Follow symlinks + # --glob: Additional conditions for search (in this case ignore everything in the .git/ folder) + export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"' + # use the_silver_searcher if available - if _has ag; then + elif _has ag; then export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -f --nocolor -g ""' fi fi