On Nov 10, 8:07 am, Bram Moolenaar <[email protected]> wrote:
>
> 'shellslash' assumes that you are using a Unix-like shell.  I don't see
> how you can set 'shellslash' and use cmd.exe, many external commands
> that use Windows commands or are handled by the shell will fail,
> since all / in the argument are seen as flags.
>

cmd.exe handles forward-slash path separators for many commands these
days (although tab-completion only works with backslash).

I have shellslash set in my .vimrc mainly so I almost never need to
worry about escaping the \ path separators within Vim. Every now and
then I need to temporarily turn it off, but usually in predefined
commands (like my CScope wrappers, for example).

I do load it as follows, I don't recall the exact issues this works
around:

" use forward slashes on Windows, but wait until after everything is
loaded to
" not screw stuff up
if has('autocmd')
  autocmd VimEnter * set shellslash
endif


Note, that the :help does not specify that 'shellslash' should *only*
be used on Unix-like shells, only that it is *useful* on Unix-like
shells. Some people (like me) also find it useful on cmd.exe, but have
encountered some problems.

I would certainly like it if shellescape() depended only on the value
of 'shell' and not on the value of 'shellslash'. But it is easy enough
to work around. Maybe just a mention in :help 'shellslash' of the
other behaviours it affects would be enough.

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui