aboutsummaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
authorPeter Odding <peter@peterodding.com>2013-05-19 23:42:08 +0200
committerPeter Odding <peter@peterodding.com>2013-05-19 23:42:08 +0200
commitf7ed989081e98df4eceaf21bc23197abeba332ef (patch)
tree9ac4bbcc4596076809c25749a30d21aab3296843 /autoload
parent3dffb26ff1fe27a4a1bb2e10abc46449ae17e4b5 (diff)
downloadvim-easytags-f7ed989081e98df4eceaf21bc23197abeba332ef.tar.gz
Bug fix: Make xolox#misc#os#exec() compatible with (t)csh (reported by Armin Widegreen)
Original report: https://github.com/xolox/vim-easytags/pull/48
Diffstat (limited to 'autoload')
-rw-r--r--autoload/xolox/misc/compat.vim4
-rw-r--r--autoload/xolox/misc/os.vim12
2 files changed, 12 insertions, 4 deletions
diff --git a/autoload/xolox/misc/compat.vim b/autoload/xolox/misc/compat.vim
index 70a4287..c950ad6 100644
--- a/autoload/xolox/misc/compat.vim
+++ b/autoload/xolox/misc/compat.vim
@@ -1,13 +1,13 @@
" Vim auto-load script
" Author: Peter Odding <peter@peterodding.com>
-" Last Change: May 13, 2013
+" Last Change: May 19, 2013
" URL: http://peterodding.com/code/vim/misc/
" The following integer will be bumped whenever a change in the miscellaneous
" scripts breaks backwards compatibility. This enables my Vim plug-ins to fail
" early when they detect an incompatible version, instead of breaking at the
" worst possible moments :-).
-let g:xolox#misc#compat#version = 3
+let g:xolox#misc#compat#version = 4
" Remember the directory where the miscellaneous scripts are loaded from
" so the user knows which plug-in to update if incompatibilities arise.
diff --git a/autoload/xolox/misc/os.vim b/autoload/xolox/misc/os.vim
index ef036df..8add797 100644
--- a/autoload/xolox/misc/os.vim
+++ b/autoload/xolox/misc/os.vim
@@ -1,9 +1,9 @@
" Vim auto-load script
" Author: Peter Odding <peter@peterodding.com>
-" Last Change: May 13, 2013
+" Last Change: May 19, 2013
" URL: http://peterodding.com/code/vim/misc/
-let g:xolox#misc#os#version = '0.2'
+let g:xolox#misc#os#version = '0.3'
function! xolox#misc#os#is_win() " {{{1
" Check whether Vim is running on Microsoft Windows.
@@ -72,6 +72,14 @@ function! xolox#misc#os#exec(options) " {{{1
endif
endif
+ " Execute the command line using 'sh' instead of the default shell,
+ " because we assume that standard output and standard error can be
+ " redirected separately, but (t)csh does not support this.
+ if has('unix')
+ call xolox#misc#msg#debug("os.vim %s: Generated shell expression: %s", g:xolox#misc#os#version, cmd)
+ let cmd = printf('sh -c %s', xolox#misc#escape#shell(cmd))
+ endif
+
" Let the user know what's happening (in case they're interested).
call xolox#misc#msg#debug("os.vim %s: Executing external command using system() function: %s", g:xolox#misc#os#version, cmd)
call system(cmd)