Files
config-bash/rc.d/fzf

48 lines
820 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
if (command -v fzf &>/dev/null); then
source <(fzf --bash)
# Navigation vers un répertoire
FZF_ALT_C_OPTS="$(
cat <<'EOF'
--height 60%
--border sharp
--layout reverse
--prompt '󰥨 '
--pointer
--marker ✔
EOF
)"
export FZF_ALT_C_OPTS
# Selection de fichiers
FZF_CTRL_T_OPTS="$(
cat <<'EOF'
--height 60%
--border sharp
--layout reverse
--prompt '󰈞 '
--pointer
--marker ✔
--preview="bat --color=always --style=-header {}"
EOF
)"
export FZF_CTRL_T_OPTS
# Navigation dans l'historique
FZF_CTRL_R_OPTS="$(
cat <<'EOF'
--height 60%
--border sharp
--layout reverse
--prompt ' '
--pointer
--marker ✔
EOF
)"
export FZF_CTRL_R_OPTS
fi