Skip to content

Commit b1be4e8

Browse files
mattnallex
authored andcommitted
fix #196
1 parent ea2f19f commit b1be4e8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

autoload/gist.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,16 @@ function! s:open_browser(url) abort
9898
echo a:url
9999
return
100100
endif
101+
let quote = &shellxquote == '"' ? "'" : '"'
101102
if cmd =~# '^!'
102-
let cmd = substitute(cmd, '%URL%', '\=shellescape(a:url)', 'g')
103+
let cmd = substitute(cmd, '%URL%', '\=quote.a:url.quote', 'g')
104+
let g:hoge = cmd
103105
silent! exec cmd
104106
elseif cmd =~# '^:[A-Z]'
105107
let cmd = substitute(cmd, '%URL%', '\=a:url', 'g')
106108
exec cmd
107109
else
108-
let cmd = substitute(cmd, '%URL%', '\=shellescape(a:url)', 'g')
110+
let cmd = substitute(cmd, '%URL%', '\=quote.a:url.quote', 'g')
109111
call system(cmd)
110112
endif
111113
endfunction

0 commit comments

Comments
 (0)