From 4977174deffb631207b90753c5d451fbe438ed18 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 13 Mar 2015 22:45:28 +0900 Subject: [PATCH] [fzf-mux] Remove unnecessary env var from command --- bin/fzf-tmux | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/fzf-tmux b/bin/fzf-tmux index 324562a..ffb98d9 100755 --- a/bin/fzf-tmux +++ b/bin/fzf-tmux @@ -107,7 +107,9 @@ fail() { exit 1 } fzf=$(which fzf 2> /dev/null) || fail "fzf executable not found" -envs="FZF_DEFAULT_OPTS=$(printf %q "$FZF_DEFAULT_OPTS") FZF_DEFAULT_COMMAND=$(printf %q "$FZF_DEFAULT_COMMAND")" +envs="" +[ -n "$FZF_DEFAULT_OPTS" ] && envs="$envs FZF_DEFAULT_OPTS=$(printf %q "$FZF_DEFAULT_OPTS")" +[ -n "$FZF_DEFAULT_COMMAND" ] && envs="$envs FZF_DEFAULT_COMMAND=$(printf %q "$FZF_DEFAULT_COMMAND")" mkfifo $fifo2 mkfifo $fifo3