|
1 | 1 | " Vim auto-load script
|
2 | 2 | " Author: Peter Odding <peter@peterodding.com>
|
3 |
| -" Last Change: November 11, 2011 |
| 3 | +" Last Change: November 21, 2011 |
4 | 4 | " URL: http://peterodding.com/code/vim/shell/
|
5 | 5 |
|
6 |
| -let g:xolox#shell#version = '0.9.21' |
| 6 | +let g:xolox#shell#version = '0.9.22' |
7 | 7 |
|
8 | 8 | if !exists('s:fullscreen_enabled')
|
9 | 9 | let s:enoimpl = "%s() hasn't been implemented on your platform! %s"
|
@@ -122,11 +122,11 @@ function! xolox#shell#execute(command, synchronous, ...) " -- execute external c
|
122 | 122 | if has_input
|
123 | 123 | let tempin = tempname()
|
124 | 124 | call writefile(type(a:1) == type([]) ? a:1 : split(a:1, "\n"), tempin)
|
125 |
| - let cmd .= ' < ' . xolox#shell#escape(tempin) |
| 125 | + let cmd .= ' < ' . xolox#misc#escape#shell(tempin) |
126 | 126 | endif
|
127 | 127 | if a:synchronous
|
128 | 128 | let tempout = tempname()
|
129 |
| - let cmd .= ' > ' . xolox#shell#escape(tempout) . ' 2>&1' |
| 129 | + let cmd .= ' > ' . xolox#misc#escape#shell(tempout) . ' 2>&1' |
130 | 130 | endif
|
131 | 131 | if xolox#misc#os#is_win() && s:has_dll()
|
132 | 132 | let fn = 'execute_' . (a:synchronous ? '' : 'a') . 'synchronous'
|
@@ -162,20 +162,6 @@ function! xolox#shell#execute(command, synchronous, ...) " -- execute external c
|
162 | 162 | endtry
|
163 | 163 | endfunction
|
164 | 164 |
|
165 |
| -function! xolox#shell#escape(argument) " -- quote command line arguments {{{1 |
166 |
| - if xolox#misc#os#is_win() |
167 |
| - try |
168 |
| - let ssl_save = &shellslash |
169 |
| - set noshellslash |
170 |
| - return shellescape(a:argument) |
171 |
| - finally |
172 |
| - let &shellslash = ssl_save |
173 |
| - endtry |
174 |
| - else |
175 |
| - return shellescape(a:argument) |
176 |
| - endif |
177 |
| -endfunction |
178 |
| - |
179 | 165 | function! xolox#shell#maximize(...) " -- show/hide Vim's menu, tool bar and/or tab line {{{1
|
180 | 166 | let new_state = a:0 == 0 ? !s:maximized : a:1
|
181 | 167 | if new_state && !s:maximized
|
|
0 commit comments