|
1 | 1 | " Vim script
|
2 | 2 | " Author: Peter Odding
|
3 |
| -" Last Change: November 15, 2011 |
| 3 | +" Last Change: November 21, 2011 |
4 | 4 | " URL: http://peterodding.com/code/vim/session/
|
5 | 5 |
|
6 |
| -let g:xolox#session#version = '1.4.22' |
| 6 | +let g:xolox#session#version = '1.4.23' |
7 | 7 |
|
8 | 8 | " Public API for session persistence. {{{1
|
9 | 9 |
|
@@ -476,18 +476,18 @@ function! xolox#session#restart_cmd(bang, args) abort " {{{2
|
476 | 476 | let name = s:get_name('', 0)
|
477 | 477 | if name == '' | let name = 'restart' | endif
|
478 | 478 | 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)) |
481 | 481 | let args = matchstr(a:args, '^\s*|\s*\zs.\+$')
|
482 | 482 | if !empty(args)
|
483 |
| - let command .= ' -c ' . shellescape(args) |
| 483 | + let command .= ' -c ' . xolox#misc#escape#shell(args) |
484 | 484 | endif
|
485 | 485 | if xolox#misc#os#is_win()
|
486 | 486 | execute '!start' command
|
487 | 487 | else
|
488 | 488 | let cmdline = []
|
489 | 489 | 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)))) |
491 | 491 | endfor
|
492 | 492 | call add(cmdline, command)
|
493 | 493 | call add(cmdline, printf("--cmd ':set enc=%s'", escape(&enc, '\ ')))
|
|
0 commit comments