1
0
mirror of https://github.com/alrayyes/server-dotfiles synced 2023-11-14 15:56:25 +00:00

use ripgrep with fzf

This commit is contained in:
Ryan Kes 2020-08-24 14:22:39 +02:00
parent a626c4f78b
commit ff3cc0ab9c

View File

@ -39,12 +39,12 @@ set -xg RUSTUP_HOME ~/.local/share/rustup
set -xg GOPATH ~/.local/share/go set -xg GOPATH ~/.local/share/go
# nvim alias # nvim alias
abbr --add v "nvim" abbr --add v 'nvim'
abbr --add sv "sudo nvim" abbr --add sv 'sudo nvim'
# ls alias # ls alias
abbr --add ls "exa" abbr --add ls 'exa'
abbr --add l "exa -al" abbr --add l 'exa -al'
# git alaises # git alaises
abbr --add gpoat "git push origin --all && git push origin --tags" 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 mv "mv -i"
abbr --add rm "rm -i" abbr --add rm "rm -i"
# Colorize diff
abbr --add diff "diff --color"
# Load lfcd wiith proper icons # Load lfcd wiith proper icons
function lf function lf
set -lx LF_ICONS "\ set -lx LF_ICONS "\
@ -220,7 +223,6 @@ ex=:\
/usr/bin/lf /usr/bin/lf
end end
# bat # bat
abbr --add bat "batcat" abbr --add bat "batcat"
@ -247,3 +249,9 @@ if set -q FZF_COMPLETE
bind -M insert \t '__fzf_complete' bind -M insert \t '__fzf_complete'
end end
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