mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-13 19:28:00 +08:00
fix(health): fix environment checking
This commit is contained in:
parent
96b24fcd54
commit
c406cec1fd
@ -5,12 +5,19 @@
|
|||||||
" URL: https://spacevim.org
|
" URL: https://spacevim.org
|
||||||
" License: GPLv3
|
" License: GPLv3
|
||||||
"=============================================================================
|
"=============================================================================
|
||||||
|
|
||||||
|
let s:CMP = SpaceVim#api#import('vim#compatible')
|
||||||
|
|
||||||
function! SpaceVim#health#environment#check() abort
|
function! SpaceVim#health#environment#check() abort
|
||||||
let result = ['SpaceVim environment check report:']
|
let result = ['SpaceVim environment check report:']
|
||||||
" FIXME: old vim does not provide v:progpath, we need a compatible function
|
" FIXME: old vim does not provide v:progpath, we need a compatible function
|
||||||
" for getting the progpath of current vim.
|
" for getting the progpath of current vim.
|
||||||
call add(result, 'Current progpath: ' . v:progname . '(' . get(v:, 'progpath', '') . ')')
|
call add(result, 'Current progpath: ' . v:progname . '(' . get(v:, 'progpath', '') . ')')
|
||||||
|
if has('nvim')
|
||||||
|
call add(result, 'version: ' . split(s:CMP.execute('version'), '\n')[0])
|
||||||
|
else
|
||||||
call add(result, 'version: ' . v:version)
|
call add(result, 'version: ' . v:version)
|
||||||
|
endif
|
||||||
call add(result, 'OS: ' . SpaceVim#api#import('system').name())
|
call add(result, 'OS: ' . SpaceVim#api#import('system').name())
|
||||||
call add(result, '[shell, shellcmdflag, shellslash]: ' . string([&shell, &shellcmdflag, &shellslash]))
|
call add(result, '[shell, shellcmdflag, shellslash]: ' . string([&shell, &shellcmdflag, &shellslash]))
|
||||||
return result
|
return result
|
||||||
|
Loading…
Reference in New Issue
Block a user