Skip to content

Commit

Permalink
fix(zsh): transform in CTRL_R
Browse files Browse the repository at this point in the history
  • Loading branch information
danztran committed Jan 1, 2024
1 parent 2024010 commit f294399
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shell/key-bindings.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ fzf-history-widget() {
local ret=$?
if [ -n "$selected" ]; then
num=$selected[1]
if [ -n "$num" ]; then
if [[ "$num" =~ ^-?[0-9]+$ ]]; then
zle vi-fetch-history -n $num
else # selected is a custom query, not from history
LBUFFER="${selected[@]}"
fi
fi
zle reset-prompt
Expand Down

0 comments on commit f294399

Please sign in to comment.