From 01405ad92ead8550d35073ff967cffc592a72665 Mon Sep 17 00:00:00 2001
From: Robin Roth <robin-roth@online.de>
Date: Sat, 9 May 2015 21:11:01 +0200
Subject: [PATCH] fix typo in argument of head

at least my version of head wants -n1 to only display the first line
---
 shell/key-bindings.zsh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh
index 17608670..86630d00 100644
--- a/shell/key-bindings.zsh
+++ b/shell/key-bindings.zsh
@@ -37,7 +37,7 @@ bindkey '\ec' fzf-cd-widget
 fzf-history-widget() {
   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
-    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
       LBUFFER=!$num
       if setopt | grep nobanghist > /dev/null; then
-- 
GitLab