summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-11-09 12:06:10 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-11-09 12:06:10 +0900
commitf1cd0e2daf4b0ba8fbe94b334a321c9c287414ad (patch)
tree4b25d66967af0865570840738e22d895bae891e6 /shell
parent90d32bd7562be34ee2e6f28b840def0d6017e7e1 (diff)
[zsh] Fix #404 - Escape $ in $LBUFFER
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 29721fc9..5817ee80 100644
--- a/shell/key-bindings.zsh
+++ b/shell/key-bindings.zsh
@@ -38,7 +38,7 @@ bindkey '\ec' fzf-cd-widget
# CTRL-R - Paste the selected command from history into the command line
fzf-history-widget() {
local selected num
- selected=( $(fc -l 1 | $(__fzfcmd) +s --tac +m -n2..,.. --tiebreak=index --toggle-sort=ctrl-r -q "$LBUFFER") )
+ selected=( $(fc -l 1 | $(__fzfcmd) +s --tac +m -n2..,.. --tiebreak=index --toggle-sort=ctrl-r -q "${LBUFFER//$/\\$}") )
if [ -n "$selected" ]; then
num=$selected[1]
if [ -n "$num" ]; then