Merge pull request #231 from robinro/head-argument-typo

[zsh] `head -n1` instead of `head -1`
This commit is contained in:
Junegunn Choi 2015-05-10 04:50:28 +09:00
commit 7dde8dbbd9

View File

@ -37,7 +37,7 @@ bindkey '\ec' fzf-cd-widget
fzf-history-widget() { fzf-history-widget() {
local selected restore_no_bang_hist local selected restore_no_bang_hist
if selected=$(fc -l 1 | $(__fzfcmd) +s --tac +m -n2..,.. --tiebreak=index --toggle-sort=ctrl-r -q "$LBUFFER"); then if selected=$(fc -l 1 | $(__fzfcmd) +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') num=$(echo "$selected" | head -n1 | awk '{print $1}' | sed 's/[^0-9]//g')
if [ -n "$num" ]; then if [ -n "$num" ]; then
LBUFFER=!$num LBUFFER=!$num
if setopt | grep nobanghist > /dev/null; then if setopt | grep nobanghist > /dev/null; then