Skip to content

Commit 8c600e9

Browse files
committed
Rename xolox#shell#escape() to xolox#misc#escape#shell()
1 parent f665486 commit 8c600e9

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

autoload/xolox/shell.vim

Lines changed: 4 additions & 18 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: November 11, 2011
3+
" Last Change: November 21, 2011
44
" URL: http://peterodding.com/code/vim/shell/
55

6-
let g:xolox#shell#version = '0.9.21'
6+
let g:xolox#shell#version = '0.9.22'
77

88
if !exists('s:fullscreen_enabled')
99
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
122122
if has_input
123123
let tempin = tempname()
124124
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)
126126
endif
127127
if a:synchronous
128128
let tempout = tempname()
129-
let cmd .= ' > ' . xolox#shell#escape(tempout) . ' 2>&1'
129+
let cmd .= ' > ' . xolox#misc#escape#shell(tempout) . ' 2>&1'
130130
endif
131131
if xolox#misc#os#is_win() && s:has_dll()
132132
let fn = 'execute_' . (a:synchronous ? '' : 'a') . 'synchronous'
@@ -162,20 +162,6 @@ function! xolox#shell#execute(command, synchronous, ...) " -- execute external c
162162
endtry
163163
endfunction
164164

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-
179165
function! xolox#shell#maximize(...) " -- show/hide Vim's menu, tool bar and/or tab line {{{1
180166
let new_state = a:0 == 0 ? !s:maximized : a:1
181167
if new_state && !s:maximized

0 commit comments

Comments
 (0)