Compare commits

..

No commits in common. "d12bc6f756b1d15ab534bdf5fa96c10375db053e" and "b4ce10f1bd4b70efe598531fdc0bc0a33aad2e72" have entirely different histories.

2 changed files with 2 additions and 6 deletions

View File

@ -93,7 +93,7 @@ EOF
local best=$(( ${#local_build_dirs} + 3 ))
local_build_dir=$(
printf '%s\n' "${local_build_dirs[@]}" |
fzf --layout=reverse --tac --info=hidden --border=rounded \
fzf --layout=reverse --info=hidden --border=rounded --tac \
--height=$(( $best < $max ? $best : $max ))
)
if [[ $? -ne 0 ]]; then

6
zshrc
View File

@ -149,15 +149,11 @@ fi
# Fuzzy history search with fzf
function fzf-history-search() {
local selected
selected=$(
history | sed 's/ *[0-9]* *//' |
fzf --layout=reverse --tac --info=hidden --border=rounded --height=50%
)
selected=`history | sed 's/ *[0-9]* *//' | fzf`
if [[ -n "$selected" ]]; then
BUFFER="$selected"
zle end-of-line
fi
zle reset-prompt
}
zle -N fzf-history-search
bindkey '^R' fzf-history-search