diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2017-01-14 01:10:34 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2017-01-14 01:10:34 +0900 |
| commit | 5b68027bee72cf32d61795694a07750d6477ee92 (patch) | |
| tree | 0f0038dcbf781e18372c283e13df3e1d2b9285fd /shell/completion.zsh | |
| parent | 48863ac55cc25f8e940cf21f5c32943de90f50c9 (diff) | |
| download | fzf-5b68027bee72cf32d61795694a07750d6477ee92.tar.gz | |
Fix $FZF_COMPLETION_OPTS evaluation
Close #799
Diffstat (limited to 'shell/completion.zsh')
| -rw-r--r-- | shell/completion.zsh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/completion.zsh b/shell/completion.zsh index fb2c16a1..d32eff14 100644 --- a/shell/completion.zsh +++ b/shell/completion.zsh @@ -56,7 +56,7 @@ __fzf_generic_path_completion() { [ -z "$dir" ] && dir='.' [ "$dir" != "/" ] && dir="${dir/%\//}" dir=${~dir} - matches=$(eval "$compgen $(printf %q "$dir")" | ${=fzf} ${=FZF_COMPLETION_OPTS} ${=fzf_opts} -q "$leftover" | while read item; do + matches=$(eval "$compgen $(printf %q "$dir")" | FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS" ${=fzf} ${=fzf_opts} -q "$leftover" | while read item; do echo -n "${(q)item}$suffix " done) matches=${matches% } @@ -99,7 +99,7 @@ _fzf_complete() { fzf="$(__fzfcmd_complete)" _fzf_feed_fifo "$fifo" - matches=$(cat "$fifo" | ${=fzf} ${=FZF_COMPLETION_OPTS} ${=fzf_opts} -q "${(Q)prefix}" | $post | tr '\n' ' ') + matches=$(cat "$fifo" | FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS" ${=fzf} ${=fzf_opts} -q "${(Q)prefix}" | $post | tr '\n' ' ') if [ -n "$matches" ]; then LBUFFER="$lbuf$matches" fi @@ -164,7 +164,7 @@ fzf-completion() { # Kill completion (do not require trigger sequence) if [ $cmd = kill -a ${LBUFFER[-1]} = ' ' ]; then fzf="$(__fzfcmd_complete)" - matches=$(ps -ef | sed 1d | ${=fzf} ${=FZF_COMPLETION_OPTS} -m | awk '{print $2}' | tr '\n' ' ') + matches=$(ps -ef | sed 1d | FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS" ${=fzf} -m | awk '{print $2}' | tr '\n' ' ') if [ -n "$matches" ]; then LBUFFER="$LBUFFER$matches" fi |
