comparison autoload/gutentags.vim @ 277:f75a8cddf174

Support powershell * Powershell takes double quoted "arguments" literally and just errors out on a gutentags call * You could unquote all the strings and try to deal with the mess that is * Or you can just prepend '& ' to the whole thing and it automagically works
author Leonardo Valeri Manera <l.valerimanera@gmail.com>
date Sat, 15 Oct 2022 03:21:13 +0200
parents 6030953258fe
children
comparison
equal deleted inserted replaced
276:0ebd3b1710aa 277:f75a8cddf174
101 " Makes an appropriate command line for use with `job_start` by converting 101 " Makes an appropriate command line for use with `job_start` by converting
102 " a list of possibly quoted arguments into a single string on Windows, or 102 " a list of possibly quoted arguments into a single string on Windows, or
103 " into a list of unquoted arguments on Unix/Mac. 103 " into a list of unquoted arguments on Unix/Mac.
104 if has('win32') || has('win64') 104 if has('win32') || has('win64')
105 function! gutentags#make_args(cmd) abort 105 function! gutentags#make_args(cmd) abort
106 return join(a:cmd, ' ') 106 if &shell == 'pwsh' || &shell == 'powershell'
107 return '& ' . join(a:cmd, ' ')
108 else
109 return join(a:cmd, ' ')
110 endif
107 endfunction 111 endfunction
108 else 112 else
109 function! gutentags#make_args(cmd) abort 113 function! gutentags#make_args(cmd) abort
110 let l:outcmd = [] 114 let l:outcmd = []
111 for cmdarg in a:cmd 115 for cmdarg in a:cmd