When trying to use vim-dutyl in a path with spaces it gives an error saying it can't run dub describe.
A fix is to modify dutyl#util#runInDirectory to the following code. The fix uses substitute to replace all spaces in the path with an escaped space "\ ".
"lcd to the directory, run the function or command, and return to the current
"directory
function! dutyl#util#runInDirectory(directory,action,...) abort
let l:cwd=getcwd()
try
let l:directory = substitute(a:directory, "\ ", '\\ ', "g")
execute 'lcd '.l:directory
if type(function('tr'))==type(a:action)
return call(a:action,a:000)
elseif type('')==type(a:action)
execute a:action
endif
finally
let l:cwd = substitute(l:cwd, "\ ", '\\ ', "g")
execute 'lcd '.l:cwd
endtry
endfunction
When trying to use vim-dutyl in a path with spaces it gives an error saying it can't run
dub describe
.A fix is to modify
dutyl#util#runInDirectory
to the following code. The fix uses substitute to replace all spaces in the path with an escaped space "\ ".