mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-12-07 04:34:35 +08:00
Simplify csh special cases
This commit is contained in:
@@ -695,16 +695,16 @@ function! s:Commit(args) abort
|
|||||||
let errorfile = tempname()
|
let errorfile = tempname()
|
||||||
try
|
try
|
||||||
execute cd.'`=s:repo().tree()`'
|
execute cd.'`=s:repo().tree()`'
|
||||||
let command = ''
|
|
||||||
if &shell =~# 'cmd'
|
if &shell =~# 'cmd'
|
||||||
|
let command = ''
|
||||||
let old_editor = $GIT_EDITOR
|
let old_editor = $GIT_EDITOR
|
||||||
let $GIT_EDITOR = 'false'
|
let $GIT_EDITOR = 'false'
|
||||||
elseif &shell !~# 'csh'
|
else
|
||||||
let command = 'GIT_EDITOR=false '
|
let command = 'env GIT_EDITOR=false '
|
||||||
endif
|
endif
|
||||||
let command .= s:repo().git_command('commit').' '.a:args
|
let command .= s:repo().git_command('commit').' '.a:args
|
||||||
if &shell =~# 'csh'
|
if &shell =~# 'csh'
|
||||||
silent execute '!setenv GIT_EDITOR false; ('.command.' > '.outfile.') >& '.errorfile
|
silent execute '!('.command.' > '.outfile.') >& '.errorfile
|
||||||
elseif a:args =~# '\%(^\| \)--interactive\>'
|
elseif a:args =~# '\%(^\| \)--interactive\>'
|
||||||
execute '!'.command.' 2> '.errorfile
|
execute '!'.command.' 2> '.errorfile
|
||||||
else
|
else
|
||||||
@@ -1589,10 +1589,8 @@ function! s:ReplaceCmd(cmd,...) abort
|
|||||||
if &shell =~# 'cmd'
|
if &shell =~# 'cmd'
|
||||||
let old_index = $GIT_INDEX_FILE
|
let old_index = $GIT_INDEX_FILE
|
||||||
let $GIT_INDEX_FILE = a:1
|
let $GIT_INDEX_FILE = a:1
|
||||||
elseif &shell =~# 'csh'
|
|
||||||
let prefix = 'setenv GIT_INDEX_FILE '.s:shellesc(a:1).'; '
|
|
||||||
else
|
else
|
||||||
let prefix = 'GIT_INDEX_FILE='.s:shellesc(a:1).' '
|
let prefix = 'env GIT_INDEX_FILE='.s:shellesc(a:1).' '
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
set noautowrite
|
set noautowrite
|
||||||
|
|||||||
Reference in New Issue
Block a user