mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-26 18:31:02 +08:00
Merge pull request #1147 from hanxueluo/master
put file path in quotes when call "system()"
This commit is contained in:
commit
9bcb6ae64e
|
@ -73,7 +73,7 @@ function! s:get_git_untracked(file)
|
|||
if has_key(s:untracked_git, a:file)
|
||||
let untracked = s:untracked_git[a:file]
|
||||
else
|
||||
let output = system('git status --porcelain -- '. a:file)
|
||||
let output = system('git status --porcelain -- '. shellescape(a:file))
|
||||
if output[0:1] is# '??' && output[3:-2] is? a:file
|
||||
let untracked = get(g:, 'airline#extensions#branch#notexists', g:airline_symbols.notexists)
|
||||
endif
|
||||
|
@ -92,7 +92,7 @@ function! s:get_hg_untracked(file)
|
|||
if has_key(s:untracked_hg, a:file)
|
||||
let untracked = s:untracked_hg[a:file]
|
||||
else
|
||||
let untracked = (system('hg status -u -- '. a:file)[0] is# '?' ?
|
||||
let untracked = (system('hg status -u -- '. shellescape(a:file))[0] is# '?' ?
|
||||
\ get(g:, 'airline#extensions#branch#notexists', g:airline_symbols.notexists) : '')
|
||||
let s:untracked_hg[a:file] = untracked
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user