diff --git a/bash/dot-bashrc b/bash/dot-bashrc new file mode 100644 index 0000000..2a0898a --- /dev/null +++ b/bash/dot-bashrc @@ -0,0 +1,6 @@ +# FZF +[ -f ~/.fzf.bash ] && source ~/.fzf.bash + +# GHQ and FZF +alias ghqcd="cd \$(ghq list --full-path | fzf)" + diff --git a/bash/dot-fzf.bash b/bash/dot-fzf.bash new file mode 100644 index 0000000..3600f73 --- /dev/null +++ b/bash/dot-fzf.bash @@ -0,0 +1,13 @@ +# Setup fzf +# --------- +if [[ ! "$PATH" == */opt/homebrew/opt/fzf/bin* ]]; then + export PATH="${PATH:+${PATH}:}/opt/homebrew/opt/fzf/bin" +fi + +# Auto-completion +# --------------- +[[ $- == *i* ]] && source "/opt/homebrew/opt/fzf/shell/completion.bash" 2> /dev/null + +# Key bindings +# ------------ +source "/opt/homebrew/opt/fzf/shell/key-bindings.bash"