From 95b34de339822d6e81898c7e52f94a7165be39bc Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 8 Jun 2016 01:30:26 +0900 Subject: [bash/zsh] Fix $FZF_CTRL_R_OPTS with option values with spaces --- shell/key-bindings.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shell/key-bindings.bash') diff --git a/shell/key-bindings.bash b/shell/key-bindings.bash index 41e707ea..b87decaa 100644 --- a/shell/key-bindings.bash +++ b/shell/key-bindings.bash @@ -51,7 +51,7 @@ __fzf_history__() ( shopt -u nocaseglob nocasematch line=$( HISTTIMEFORMAT= history | - $(__fzfcmd) +s --tac +m -n2..,.. --tiebreak=index --toggle-sort=ctrl-r $FZF_CTRL_R_OPTS | + eval "$(__fzfcmd) +s --tac +m -n2..,.. --tiebreak=index --toggle-sort=ctrl-r $FZF_CTRL_R_OPTS" | \grep '^ *[0-9]') && if [[ $- =~ H ]]; then sed 's/^ *\([0-9]*\)\** .*/!\1/' <<< "$line" -- cgit v1.2.3