From 4313cbb398d8b61b08be09f9b5a9ae4270c86004 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 26 Mar 2021 13:34:59 -0400 Subject: [PATCH] Fix :Start on iTerm The command passed to iTerm seems to support shell quoting but not variable expansion. Accommodating in dispatch#isolate() is easiest; let's hope that doesn't impact other adapters. Closes https://github.com/tpope/vim-dispatch/issues/309 --- autoload/dispatch.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/dispatch.vim b/autoload/dispatch.vim index d8f5a07..02b4b9c 100644 --- a/autoload/dispatch.vim +++ b/autoload/dispatch.vim @@ -354,7 +354,7 @@ function! dispatch#isolate(request, keep, ...) abort let command += a:000 let temp = type(a:request) == type({}) ? a:request.file . '.dispatch' : dispatch#tempname() call writefile(command, temp) - return 'env -i ' . join(map(copy(keep), 'v:val."=\"$". v:val ."\" "'), '') . &shell . ' ' . temp + return 'env -i ' . join(map(copy(keep), 'v:val."=". dispatch#shellescape(eval("$".v:val))." "'), '') . &shell . ' ' . temp endfunction function! s:current_compiler(...) abort