aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)