Skip to content

Commit 02babeb

Browse files
committed
Work around &shellslash setting on Windows
1 parent 6ce4f2f commit 02babeb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

autoload/xolox/session.vim

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
" Vim script
22
" Author: Peter Odding
3-
" Last Change: November 15, 2011
3+
" Last Change: November 21, 2011
44
" URL: http://peterodding.com/code/vim/session/
55

6-
let g:xolox#session#version = '1.4.22'
6+
let g:xolox#session#version = '1.4.23'
77

88
" Public API for session persistence. {{{1
99

@@ -476,18 +476,18 @@ function! xolox#session#restart_cmd(bang, args) abort " {{{2
476476
let name = s:get_name('', 0)
477477
if name == '' | let name = 'restart' | endif
478478
execute 'SaveSession' . a:bang fnameescape(name)
479-
let progname = shellescape(fnameescape(v:progname))
480-
let command = progname . ' -c ' . shellescape('OpenSession\! ' . fnameescape(name))
479+
let progname = xolox#misc#escape#shell(fnameescape(v:progname))
480+
let command = progname . ' -c ' . xolox#misc#escape#shell('OpenSession\! ' . fnameescape(name))
481481
let args = matchstr(a:args, '^\s*|\s*\zs.\+$')
482482
if !empty(args)
483-
let command .= ' -c ' . shellescape(args)
483+
let command .= ' -c ' . xolox#misc#escape#shell(args)
484484
endif
485485
if xolox#misc#os#is_win()
486486
execute '!start' command
487487
else
488488
let cmdline = []
489489
for variable in g:session_restart_environment
490-
call add(cmdline, variable . '=' . shellescape(fnameescape(eval('$' . variable))))
490+
call add(cmdline, variable . '=' . xolox#misc#escape#shell(fnameescape(eval('$' . variable))))
491491
endfor
492492
call add(cmdline, command)
493493
call add(cmdline, printf("--cmd ':set enc=%s'", escape(&enc, '\ ')))

0 commit comments

Comments
 (0)