feat(bash): added bash config

This commit is contained in:
2022-05-09 01:09:04 +08:00
parent 50d445306b
commit 565dfe3b33
2 changed files with 19 additions and 0 deletions

6
bash/dot-bashrc Normal file
View File

@@ -0,0 +1,6 @@
# FZF
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
# GHQ and FZF
alias ghqcd="cd \$(ghq list --full-path | fzf)"

13
bash/dot-fzf.bash Normal file
View File

@@ -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"