summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-05-10 04:50:28 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-05-10 04:50:28 +0900
commit7dde8dbbd9ed6056b86ce8040fa60a85207a90c1 (patch)
treebd54a6a59bfce2b556ebf4bd6db5fe2aa32f38ab /shell
parent683abb86efe910d656fc95005e74a3888b49541b (diff)
parent01405ad92ead8550d35073ff967cffc592a72665 (diff)
downloadfzf-7dde8dbbd9ed6056b86ce8040fa60a85207a90c1.tar.gz
Merge pull request #231 from robinro/head-argument-typo
[zsh] `head -n1` instead of `head -1`
Diffstat (limited to 'shell')
-rw-r--r--shell/key-bindings.zsh2
1 files changed, 1 insertions, 1 deletions
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