From bc43486dbf8621a12bd9d16e9c4569ba36415f92 Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Tue, 7 Mar 2023 10:46:41 +0100 Subject: [PATCH] shell: dont replace native fzf per default --- files/shell/.bashrc | 3 +-- files/shell/.shellrc.alias | 2 +- files/shell/.zshrc | 4 +--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/files/shell/.bashrc b/files/shell/.bashrc index ba201a5..de917e7 100644 --- a/files/shell/.bashrc +++ b/files/shell/.bashrc @@ -48,11 +48,10 @@ export FZF_DEFAULT_OPTS=' --color=marker:#5c6a72,spinner:#5c6a72,header:#5c6a72' if [[ -d ~/.vim/plugged/fzf ]]; then + [[ -x $(which fzf 2> /dev/null )]] || PATH=$PATH:$HOME/.vim/plugged/fzf/bin source ~/.vim/plugged/fzf/shell/completion.bash source ~/.vim/plugged/fzf/shell/key-bindings.bash bind '"":"fzf-file-widget\n"' -else - bindkey '^R' history-incremental-search-backward fi # ============================== Source other definitions diff --git a/files/shell/.shellrc.alias b/files/shell/.shellrc.alias index 09516be..b5fca77 100644 --- a/files/shell/.shellrc.alias +++ b/files/shell/.shellrc.alias @@ -1,6 +1,6 @@ # zsh specific if [[ "$SHELL" =~ "zsh$" ]]; then - alias -g G='| grep -i' + alias -g G='| rg -i' alias -g L='| less' fi diff --git a/files/shell/.zshrc b/files/shell/.zshrc index 9377a50..38c1307 100644 --- a/files/shell/.zshrc +++ b/files/shell/.zshrc @@ -84,7 +84,6 @@ RPS2=$RPS1 bindkey -v '^?' backward-delete-char # ============================== fzf -# export FZF_DEFAULT_COMMAND='fd .' export FZF_DEFAULT_OPTS=' --layout=reverse --color=fg:#5c6a72,bg:#FDF6E3,hl:#8da101 @@ -93,11 +92,10 @@ export FZF_DEFAULT_OPTS=' --color=marker:#5c6a72,spinner:#5c6a72,header:#5c6a72' if [[ -d ~/.vim/plugged/fzf ]]; then + [[ -x $(which fzf 2> /dev/null) ]] || PATH=$PATH:$HOME/.vim/plugged/fzf/bin source ~/.vim/plugged/fzf/shell/completion.zsh source ~/.vim/plugged/fzf/shell/key-bindings.zsh bindkey '^F' fzf-file-widget -else - bindkey '^R' history-incremental-search-backward fi # ============================== Fancy Hacks