Skip to content

Commit

Permalink
Delegate "Up arrow key" to fzf with aliasing Ctrl+R in bash
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Jan 17, 2023
1 parent dbf0a7d commit c7eb310
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .config/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,19 @@ if ! shopt -oq posix; then
fi
fi

# https://github.com/Bash-it/bash-it/blob/00062bfcb6c6a68cd2c9d2c76ed764e01e930e87/plugins/available/history-substring-search.plugin.bash
if [[ ${SHELLOPTS} =~ (vi|emacs) ]]; then
bind '"\e[A":history-substring-search-backward'
bind '"\e[B":history-substring-search-forward'
fi

. "$HOME/.cargo/env"

# # https://github.com/Bash-it/bash-it/blob/00062bfcb6c6a68cd2c9d2c76ed764e01e930e87/plugins/available/history-substring-search.plugin.bash
# if [[ ${SHELLOPTS} =~ (vi|emacs) ]]; then
# bind '"\e[A":history-substring-search-backward'
# bind '"\e[B":history-substring-search-forward'
# fi

[ -f ~/.fzf.bash ] && source ~/.fzf.bash

# Delegate history search with "Up arrow key" to fzf
bind '"\e[A":"\C-r"'

eval "$(starship init bash)"

. ~/.aliases.sh

0 comments on commit c7eb310

Please sign in to comment.