Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f7ed989

Browse files
committed
Bug fix: Make xolox#misc#os#exec() compatible with (t)csh (reported by Armin Widegreen)
Original report: xolox/vim-easytags#48
1 parent 3dffb26 commit f7ed989

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

‎autoload/xolox/misc/compat.vim‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
" Vim auto-load script
22
" Author: Peter Odding <peter@peterodding.com>
3-
" Last Change: May 13, 2013
3+
" Last Change: May 19, 2013
44
" URL: http://peterodding.com/code/vim/misc/
55

66
" The following integer will be bumped whenever a change in the miscellaneous
77
" scripts breaks backwards compatibility. This enables my Vim plug-ins to fail
88
" early when they detect an incompatible version, instead of breaking at the
99
" worst possible moments :-).
10-
let g:xolox#misc#compat#version = 3
10+
let g:xolox#misc#compat#version = 4
1111

1212
" Remember the directory where the miscellaneous scripts are loaded from
1313
" so the user knows which plug-in to update if incompatibilities arise.

‎autoload/xolox/misc/os.vim‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
" Vim auto-load script
22
" Author: Peter Odding <peter@peterodding.com>
3-
" Last Change: May 13, 2013
3+
" Last Change: May 19, 2013
44
" URL: http://peterodding.com/code/vim/misc/
55

6-
let g:xolox#misc#os#version = '0.2'
6+
let g:xolox#misc#os#version = '0.3'
77

88
function! xolox#misc#os#is_win() " {{{1
99
" Check whether Vim is running on Microsoft Windows.
@@ -72,6 +72,14 @@ function! xolox#misc#os#exec(options) " {{{1
7272
endif
7373
endif
7474

75+
" Execute the command line using 'sh' instead of the default shell,
76+
" because we assume that standard output and standard error can be
77+
" redirected separately, but (t)csh does not support this.
78+
if has('unix')
79+
call xolox#misc#msg#debug("os.vim %s: Generated shell expression: %s", g:xolox#misc#os#version, cmd)
80+
let cmd = printf('sh -c %s', xolox#misc#escape#shell(cmd))
81+
endif
82+
7583
" Let the user know what's happening (in case they're interested).
7684
call xolox#misc#msg#debug("os.vim %s: Executing external command using system() function: %s", g:xolox#misc#os#version, cmd)
7785
call system(cmd)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /