mirror of
https://github.com/akelge/zsh
synced 2025-07-04 13:39:07 +00:00
Added vim-flake8 (pyflakes+pep8+mccabe)
Updated vcs plugin
This commit is contained in:
@ -65,7 +65,7 @@ let s:bzrFunctions = {}
|
||||
" Returns the executable used to invoke bzr suitable for use in a shell
|
||||
" command.
|
||||
function! s:Executable()
|
||||
return VCSCommandGetOption('VCSCommandBZRExec', 'bzr')
|
||||
return shellescape(VCSCommandGetOption('VCSCommandBZRExec', 'bzr'))
|
||||
endfunction
|
||||
|
||||
" Function: s:DoCommand(cmd, cmdName, statusText) {{{2
|
||||
|
@ -378,31 +378,21 @@ endfunction
|
||||
" command line on Windows systems.
|
||||
|
||||
function! s:VCSCommandUtility.system(...)
|
||||
if (has("win32") || has("win64")) && &sxq !~ '"'
|
||||
let save_sxq = &sxq
|
||||
set sxq=\"
|
||||
endif
|
||||
try
|
||||
let output = call('system', a:000)
|
||||
if exists('*iconv') && has('multi_byte')
|
||||
if(strlen(&tenc) && &tenc != &enc)
|
||||
let output = iconv(output, &tenc, &enc)
|
||||
else
|
||||
let originalBuffer = VCSCommandGetOriginalBuffer(VCSCommandGetOption('VCSCommandEncodeAsFile', 0))
|
||||
if originalBuffer
|
||||
let fenc = getbufvar(originalBuffer, '&fenc')
|
||||
if fenc != &enc
|
||||
let output = iconv(output, fenc, &enc)
|
||||
endif
|
||||
let output = call('system', a:000)
|
||||
if exists('*iconv') && has('multi_byte')
|
||||
if(strlen(&tenc) && &tenc != &enc)
|
||||
let output = iconv(output, &tenc, &enc)
|
||||
else
|
||||
let originalBuffer = VCSCommandGetOriginalBuffer(VCSCommandGetOption('VCSCommandEncodeAsFile', 0))
|
||||
if originalBuffer
|
||||
let fenc = getbufvar(originalBuffer, '&fenc')
|
||||
if fenc != &enc
|
||||
let output = iconv(output, fenc, &enc)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
endif
|
||||
finally
|
||||
if exists("save_sxq")
|
||||
let &sxq = save_sxq
|
||||
endif
|
||||
endtry
|
||||
endif
|
||||
return output
|
||||
endfunction
|
||||
|
||||
@ -1033,8 +1023,7 @@ function! s:VCSVimDiff(...)
|
||||
let b:VCSCommandCommand = 'vimdiff'
|
||||
diffthis
|
||||
let t:vcsCommandVimDiffScratchList = [resultBuffer]
|
||||
" If no split method is defined, cheat, and set it to vertical.
|
||||
call s:VCSCommandUtility.pushContext({'VCSCommandSplit': orientation})
|
||||
call s:VCSCommandUtility.pushContext({'VCSCommandEdit': 'split', 'VCSCommandSplit': orientation})
|
||||
try
|
||||
let resultBuffer = s:VCSReview(a:2)
|
||||
finally
|
||||
@ -1048,7 +1037,6 @@ function! s:VCSVimDiff(...)
|
||||
diffthis
|
||||
let t:vcsCommandVimDiffScratchList += [resultBuffer]
|
||||
else
|
||||
" Add new buffer. Force splitting behavior, otherwise why use vimdiff?
|
||||
call s:VCSCommandUtility.pushContext({'VCSCommandEdit': 'split', 'VCSCommandSplit': orientation})
|
||||
try
|
||||
if(a:0 == 0)
|
||||
|
@ -111,7 +111,7 @@ let s:cvsFunctions = {}
|
||||
" Returns the executable used to invoke cvs suitable for use in a shell
|
||||
" command.
|
||||
function! s:Executable()
|
||||
return VCSCommandGetOption('VCSCommandCVSExec', 'cvs')
|
||||
return shellescape(VCSCommandGetOption('VCSCommandCVSExec', 'cvs'))
|
||||
endfunction
|
||||
|
||||
" Function: s:DoCommand(cmd, cmdName, statusText, options) {{{2
|
||||
|
@ -70,7 +70,7 @@ let s:gitFunctions = {}
|
||||
" Returns the executable used to invoke git suitable for use in a shell
|
||||
" command.
|
||||
function! s:Executable()
|
||||
return VCSCommandGetOption('VCSCommandGitExec', 'git')
|
||||
return shellescape(VCSCommandGetOption('VCSCommandGitExec', 'git'))
|
||||
endfunction
|
||||
|
||||
" Function: s:DoCommand(cmd, cmdName, statusText, options) {{{2
|
||||
|
@ -72,7 +72,7 @@ let s:hgFunctions = {}
|
||||
" Returns the executable used to invoke hg suitable for use in a shell
|
||||
" command.
|
||||
function! s:Executable()
|
||||
return VCSCommandGetOption('VCSCommandHGExec', 'hg')
|
||||
return shellescape(VCSCommandGetOption('VCSCommandHGExec', 'hg'))
|
||||
endfunction
|
||||
|
||||
" Function: s:DoCommand(cmd, cmdName, statusText, options) {{{2
|
||||
|
@ -65,7 +65,7 @@ let s:svkFunctions = {}
|
||||
" Returns the executable used to invoke SVK suitable for use in a shell
|
||||
" command.
|
||||
function! s:Executable()
|
||||
return VCSCommandGetOption('VCSCommandSVKExec', 'svk')
|
||||
return shellescape(VCSCommandGetOption('VCSCommandSVKExec', 'svk'))
|
||||
endfunction
|
||||
|
||||
" Function: s:DoCommand(cmd, cmdName, statusText, options) {{{2
|
||||
|
@ -72,7 +72,7 @@ let s:svnFunctions = {}
|
||||
" Returns the executable used to invoke git suitable for use in a shell
|
||||
" command.
|
||||
function! s:Executable()
|
||||
return VCSCommandGetOption('VCSCommandSVNExec', 'svn')
|
||||
return shellescape(VCSCommandGetOption('VCSCommandSVNExec', 'svn'))
|
||||
endfunction
|
||||
|
||||
" Function: s:DoCommand(cmd, cmdName, statusText, options) {{{2
|
||||
@ -193,6 +193,10 @@ function! s:svnFunctions.GetBufferInfo()
|
||||
if statusText =~ '^?'
|
||||
return ['Unknown']
|
||||
endif
|
||||
" File explicitly ignored by SVN.
|
||||
if statusText =~ '^I'
|
||||
return ['Ignored']
|
||||
endif
|
||||
|
||||
let [flags, revision, repository] = matchlist(statusText, '^\(.\{9}\)\s*\(\d\+\)\s\+\(\d\+\)')[1:3]
|
||||
if revision == ''
|
||||
|
Reference in New Issue
Block a user