7 lines
258 B
Text
7 lines
258 B
Text
local selected
|
|
if selected=$(fc -l 1 | fzf +s --tac +m -n2..,.. --tiebreak=index --toggle-sort=ctrl-r -q "$LBUFFER"); then
|
|
num=$(echo "$selected" | head -1 | awk '{print $1}' | sed 's/[^0-9]//g')
|
|
LBUFFER=!$num
|
|
zle expand-history
|
|
fi
|
|
zle redisplay
|