2015-04-17 21:44:53 +00:00
|
|
|
local selected
|
2015-04-19 19:09:26 +00:00
|
|
|
if selected=$(fc -l 1 | fzf +s --tac +m -n2..,.. --tiebreak=index --toggle-sort=ctrl-r -q "$LBUFFER"); then
|
2015-04-17 21:44:53 +00:00
|
|
|
num=$(echo "$selected" | head -1 | awk '{print $1}' | sed 's/[^0-9]//g')
|
|
|
|
LBUFFER=!$num
|
|
|
|
zle expand-history
|
|
|
|
fi
|
|
|
|
zle redisplay
|