1
0
mirror of https://github.com/akelge/zsh synced 2025-07-04 21:49:05 +00:00

Added GetLatestScript update plugin and updated all plugins

This commit is contained in:
2013-01-17 12:18:17 +00:00
parent d9013ec2da
commit 4873c64f28
54 changed files with 10380 additions and 4761 deletions

View File

@ -2,10 +2,9 @@
"
" git extension for VCSCommand.
"
" Version: VCS development
" Maintainer: Bob Hiestand <bob.hiestand@gmail.com>
" License:
" Copyright (c) 2008 Bob Hiestand
" Copyright (c) Bob Hiestand
"
" Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to
@ -49,7 +48,9 @@ if v:version < 700
finish
endif
runtime plugin/vcscommand.vim
if !exists('g:loaded_VCSCommand')
runtime plugin/vcscommand.vim
endif
if !executable(VCSCommandGetOption('VCSCommandGitExec', 'git'))
" git is not installed
@ -69,7 +70,7 @@ let s:gitFunctions = {}
" Returns the executable used to invoke git suitable for use in a shell
" command.
function! s:Executable()
return shellescape(VCSCommandGetOption('VCSCommandGitExec', 'git'))
return VCSCommandGetOption('VCSCommandGitExec', 'git')
endfunction
" Function: s:DoCommand(cmd, cmdName, statusText, options) {{{2
@ -111,7 +112,7 @@ endfunction
" Function: s:gitFunctions.Annotate(argList) {{{2
function! s:gitFunctions.Annotate(argList)
if len(a:argList) == 0
if &filetype == 'gitAnnotate'
if &filetype == 'gitannotate'
" Perform annotation of the version indicated by the current line.
let options = matchstr(getline('.'),'^\x\+')
else
@ -123,21 +124,16 @@ function! s:gitFunctions.Annotate(argList)
let options = join(a:argList, ' ')
endif
let resultBuffer = s:DoCommand('blame ' . options, 'annotate', options, {})
if resultBuffer > 0
normal 1G
set filetype=gitAnnotate
endif
return resultBuffer
return s:DoCommand('blame ' . options, 'annotate', options, {})
endfunction
" Function: s:gitFunctions.Commit(argList) {{{2
function! s:gitFunctions.Commit(argList)
let resultBuffer = s:DoCommand('commit -F "' . a:argList[0] . '"', 'commit', '', {})
if resultBuffer == 0
try
return s:DoCommand('commit -F "' . a:argList[0] . '"', 'commit', '', {})
catch /\m^Version control command failed.*nothing\%( added\)\? to commit/
echomsg 'No commit needed.'
endif
return resultBuffer
endtry
endfunction
" Function: s:gitFunctions.Delete() {{{2
@ -165,13 +161,7 @@ function! s:gitFunctions.Diff(argList)
endfor
endif
let resultBuffer = s:DoCommand(join(['diff'] + diffOptions + a:argList), 'diff', join(a:argList), {})
if resultBuffer > 0
set filetype=diff
else
echomsg 'No differences found'
endif
return resultBuffer
return s:DoCommand(join(['diff'] + diffOptions + a:argList), 'diff', join(a:argList), {})
endfunction
" Function: s:gitFunctions.GetBufferInfo() {{{2
@ -212,11 +202,7 @@ endfunction
" Function: s:gitFunctions.Log() {{{2
function! s:gitFunctions.Log(argList)
let resultBuffer=s:DoCommand(join(['log'] + a:argList), 'log', join(a:argList, ' '), {})
if resultBuffer > 0
set filetype=gitlog
endif
return resultBuffer
return s:DoCommand(join(['log'] + a:argList), 'log', join(a:argList, ' '), {})
endfunction
" Function: s:gitFunctions.Revert(argList) {{{2
@ -241,11 +227,7 @@ function! s:gitFunctions.Review(argList)
let prefix = substitute(prefix, '\n$', '', '')
let blob = '"' . revision . ':' . prefix . '<VCSCOMMANDFILE>"'
let resultBuffer = s:DoCommand('show ' . blob, 'review', revision, {})
if resultBuffer > 0
let &filetype=getbufvar(b:VCSCommandOriginalBuffer, '&filetype')
endif
return resultBuffer
return s:DoCommand('show ' . blob, 'review', revision, {})
endfunction
" Function: s:gitFunctions.Status(argList) {{{2