Compare commits
2 Commits
b4ce10f1bd
...
d12bc6f756
Author | SHA1 | Date | |
---|---|---|---|
d12bc6f756 | |||
e269e6ff8d |
@ -93,7 +93,7 @@ EOF
|
|||||||
local best=$(( ${#local_build_dirs} + 3 ))
|
local best=$(( ${#local_build_dirs} + 3 ))
|
||||||
local_build_dir=$(
|
local_build_dir=$(
|
||||||
printf '%s\n' "${local_build_dirs[@]}" |
|
printf '%s\n' "${local_build_dirs[@]}" |
|
||||||
fzf --layout=reverse --info=hidden --border=rounded --tac \
|
fzf --layout=reverse --tac --info=hidden --border=rounded \
|
||||||
--height=$(( $best < $max ? $best : $max ))
|
--height=$(( $best < $max ? $best : $max ))
|
||||||
)
|
)
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
|
6
zshrc
6
zshrc
@ -149,11 +149,15 @@ fi
|
|||||||
# Fuzzy history search with fzf
|
# Fuzzy history search with fzf
|
||||||
function fzf-history-search() {
|
function fzf-history-search() {
|
||||||
local selected
|
local selected
|
||||||
selected=`history | sed 's/ *[0-9]* *//' | fzf`
|
selected=$(
|
||||||
|
history | sed 's/ *[0-9]* *//' |
|
||||||
|
fzf --layout=reverse --tac --info=hidden --border=rounded --height=50%
|
||||||
|
)
|
||||||
if [[ -n "$selected" ]]; then
|
if [[ -n "$selected" ]]; then
|
||||||
BUFFER="$selected"
|
BUFFER="$selected"
|
||||||
zle end-of-line
|
zle end-of-line
|
||||||
fi
|
fi
|
||||||
|
zle reset-prompt
|
||||||
}
|
}
|
||||||
zle -N fzf-history-search
|
zle -N fzf-history-search
|
||||||
bindkey '^R' fzf-history-search
|
bindkey '^R' fzf-history-search
|
||||||
|
Loading…
x
Reference in New Issue
Block a user