From 50abb5e95a8d496dbda7b04a9bb78e4a6cd0a968 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 24 Sep 2019 08:43:48 +0200 Subject: [PATCH] jedi#debug_info: escape script path for "git" (#950) Ref: https://github.com/davidhalter/jedi-vim/issues/949 --- autoload/jedi.vim | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/autoload/jedi.vim b/autoload/jedi.vim index 4ebd96f..4285102 100644 --- a/autoload/jedi.vim +++ b/autoload/jedi.vim @@ -56,7 +56,7 @@ endfor " ------------------------------------------------------------------------ " Python initialization " ------------------------------------------------------------------------ -let s:script_path = fnameescape(expand(':p:h:h')) +let s:script_path = expand(':p:h:h') " Initialize Python (PythonJedi command). function! s:init_python() abort @@ -181,16 +181,17 @@ function! jedi#debug_info() abort echohl WarningMsg | echo 'You should run this in a buffer with filetype "python".' | echohl None endif endif + let spath = shellescape(s:script_path) echo '#### Jedi-vim debug information' echo "\n" echo '##### jedi-vim version' echo "\n" echo ' - jedi-vim git version: ' - echon substitute(system('git -C '.s:script_path.' describe --tags --always --dirty'), '\v\n$', '', '') + echon substitute(system('git -C '.spath.' describe --tags --always --dirty'), '\v\n$', '', '') echo ' - jedi git submodule status: ' - echon substitute(system('git -C '.s:script_path.' submodule status pythonx/jedi'), '\v\n$', '', '') + echon substitute(system('git -C '.spath.' submodule status pythonx/jedi'), '\v\n$', '', '') echo ' - parso git submodule status: ' - echon substitute(system('git -C '.s:script_path.' submodule status pythonx/parso'), '\v\n$', '', '') + echon substitute(system('git -C '.spath.' submodule status pythonx/parso'), '\v\n$', '', '') echo "\n" echo '##### Global Python' echo "\n"