diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 1b7a560..a6e3761 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -149,10 +149,15 @@ function! s:execute(dict, command, temps) endfunction function! s:execute_tmux(dict, command, temps) + let command = a:command + if exists('$FZF_DEFAULT_OPTS') + let command = expand('FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS" ') . command + endif + if exists('$FZF_DEFAULT_COMMAND') + let command = expand('FZF_DEFAULT_COMMAND="$FZF_DEFAULT_COMMAND" ') . command + endif if has_key(a:dict, 'dir') - let command = 'cd '.s:escape(a:dict.dir).' && '.a:command - else - let command = a:command + let command = 'cd '.s:escape(a:dict.dir).' && '.command endif let splitopt = '-v'