summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bashrc10
1 files changed, 10 insertions, 0 deletions
diff --git a/bashrc b/bashrc
index 99cc2d2..5fd174b 100644
--- a/bashrc
+++ b/bashrc
@@ -69,3 +69,13 @@ export GPG_TTY=$(tty)
export MANPAGER="/bin/sh -c \"col -b -x | view -u ~/.vim/pager.vim -c 'set ft=man nomod nolist' -\""
export PERLDOC_PAGER=$MANPAGER
+
+# fzf
+[ -f /usr/share/doc/fzf/examples/key-bindings.bash ] && source /usr/share/doc/fzf/examples/key-bindings.bash
+[ -f /usr/share/bash-completion/completions/fzf ] && source /usr/share/bash-completion/completions/fzf
+[ -x "$(command -v tree)" ] && export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -100'"
+if [ -x "$(command -v fd)" ]; then
+ export FZF_DEFAULT_COMMAND='fd --type f --color=never'
+ export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
+ export FZF_ALT_C_COMMAND='fd --type d . --color=never'
+fi