jedi#debug_info: escape script path for "git" (#950)

Ref: https://github.com/davidhalter/jedi-vim/issues/949
This commit is contained in:
Daniel Hahler
2019-09-24 08:43:48 +02:00
committed by GitHub
parent 89c995e7d9
commit 50abb5e95a

View File

@@ -56,7 +56,7 @@ endfor
" ------------------------------------------------------------------------ " ------------------------------------------------------------------------
" Python initialization " Python initialization
" ------------------------------------------------------------------------ " ------------------------------------------------------------------------
let s:script_path = fnameescape(expand('<sfile>:p:h:h')) let s:script_path = expand('<sfile>:p:h:h')
" Initialize Python (PythonJedi command). " Initialize Python (PythonJedi command).
function! s:init_python() abort 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 echohl WarningMsg | echo 'You should run this in a buffer with filetype "python".' | echohl None
endif endif
endif endif
let spath = shellescape(s:script_path)
echo '#### Jedi-vim debug information' echo '#### Jedi-vim debug information'
echo "\n" echo "\n"
echo '##### jedi-vim version' echo '##### jedi-vim version'
echo "\n" echo "\n"
echo ' - jedi-vim git version: ' 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: ' 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: ' 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 "\n"
echo '##### Global Python' echo '##### Global Python'
echo "\n" echo "\n"