From ff3cc0ab9cd35f70f6f30d1f0d53aec92d6c7f44 Mon Sep 17 00:00:00 2001 From: Ryan Kes <> Date: Mon, 24 Aug 2020 14:22:39 +0200 Subject: [PATCH] use ripgrep with fzf --- fish/.config/omf/init.fish | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/fish/.config/omf/init.fish b/fish/.config/omf/init.fish index d8deea1..99071ca 100644 --- a/fish/.config/omf/init.fish +++ b/fish/.config/omf/init.fish @@ -39,12 +39,12 @@ set -xg RUSTUP_HOME ~/.local/share/rustup set -xg GOPATH ~/.local/share/go # nvim alias -abbr --add v "nvim" -abbr --add sv "sudo nvim" +abbr --add v 'nvim' +abbr --add sv 'sudo nvim' # ls alias -abbr --add ls "exa" -abbr --add l "exa -al" +abbr --add ls 'exa' +abbr --add l 'exa -al' # git alaises abbr --add gpoat "git push origin --all && git push origin --tags" @@ -56,6 +56,9 @@ abbr --add g "git" abbr --add mv "mv -i" abbr --add rm "rm -i" +# Colorize diff +abbr --add diff "diff --color" + # Load lfcd wiith proper icons function lf set -lx LF_ICONS "\ @@ -220,7 +223,6 @@ ex=:\ /usr/bin/lf end - # bat abbr --add bat "batcat" @@ -247,3 +249,9 @@ if set -q FZF_COMPLETE bind -M insert \t '__fzf_complete' end end + +# Make fzf use ripgrep if available +if type rg &> /dev/null + export FZF_DEFAULT_COMMAND='rg --files' + export FZF_DEFAULT_OPTS='-m --height 50% --border' +end