xolox/vim-easytags — pull request #50 by inkarkat (2013-05-23 14:52:03+00:00)
Title: Move the shellescaping of the command to stage 2.

On Windows, I get the following error

Error detected while processing pre-vimrc command line:
E115: Missing quote: 'ctags --fields=+l --c-kinds=+p --c++-kinds=+p --sort=no -f-

from the following command

"C:\Program Files\vim\vim73\gvim.exe" -u NONE -U NONE --noplugin -N --cmd "let &rtp = 'D:/A/.vim,C:\Program Files\vim/vimfiles,C:\Program Files\vim\vim73,C:\Program Files\vim/vimfiles/after,D:/A/.vim/after' | call xolox#easytags#update_remote({'cmdline': 'ctags --fields=+l --c-kinds=+p --c++-kinds=+p --sort=no -f- ""--language-force=vim"" ""D:\A\Unixhome\.vim\autoload\xolox\misc\path.vim""', 'by_filetype': '', 'tagsfile': '\A\Unixhome\.vim\tags', 'servername': 'GVIM', 'verbose': 1, 'have_args': 0, 'starttime': [400, 326843564], 'silent': 1, 'filter_tags': 0, 'cache': {}})"

The problem is in the doubled double quotes (""), resulting from xolox#misc#escape#shell() applied twice, one time for the shell execution in stage 2, and once for launching stage 2 from stage 1. Unfortunately, shell escaping is a hairy mess. Let's work around that by passing the individual command args as the original list to stage 2, and apply the shell escaping and joining there.