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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user