1
0
mirror of https://github.com/gryf/tagbar.git synced 2025-12-17 19:40:27 +01:00

Escape all cmd.exe reserved chars

This commit is contained in:
Jan Larres
2012-09-11 17:44:14 +12:00
parent ba6eb10e49
commit 63e689b647

View File

@@ -3154,7 +3154,12 @@ function! s:EscapeCtagsCmd(ctags_bin, args, ...) abort
" Stupid cmd.exe quoting
if &shell =~ 'cmd\.exe'
let ctags_cmd = substitute(ctags_cmd, '\(&\|\^\)', '^\0', 'g')
let reserved_chars = '&()@^'
" not allowed in filenames, but escape anyway just in case
let reserved_chars .= '<>|'
let pattern = join(split(reserved_chars, '\zs'), '\|')
let ctags_cmd = substitute(ctags_cmd, '\V\(' . pattern . '\)',
\ '^\0', 'g')
endif
if exists('+shellslash')