Jan Larres <[email protected]>:
>>> Ben Schmidt<[email protected]>:
>>>>> One of the ways to avoid spaces in Windows names of files and
>>>>> directories is to replace any "controversial" names by their 8.3
>>>>> equivalents
>>>>
>>>> Of course, this will only work on filesystems that still support
>>>> 8.3 equivalents and have that functionality turned on, which isn't
>>>> always the case these days. Just a potential gotcha with that
>>>> approach.
>
> Now to find some other workaround ...

Just for the record, this seems to work for me in all the cases I tested
without the 8.3 workaround (partially based on the discussion at
http://vim.1045645.n5.nabble.com/bad-default-shellxquote-in-Widows-td1208284.html
 ):


  if exists('+shellslash')
      let shellslash_save = &shellslash
      set noshellslash
  endif

  let mycmd = shellescape(mybinary) . ' ' .  myargs . ' ' . 
shellescape(myfilename)

  if &shell =~ 'cmd\.exe'
      let shellxquote_save = &shellxquote
      set shellxquote=\"
      let shellcmdflag_save = &shellcmdflag
      set shellcmdflag=/s\ /c
  endif

  let output = system(mycmd)

  if &shell =~ 'cmd\.exe'
      let &shellxquote  = shellxquote_save
      let &shellcmdflag = shellcmdflag_save
  endif

  if exists('+shellslash')
      let &shellslash = shellslash_save
  endif


Jan

-- 
-[ OpenPGP key ID: 00A0FD5F ]-
The major problems in the world are the result of the difference between how
nature works and the way people think.
                -- Gregory Bateson

-- 
You received this message from the "vim_use" 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

Reply via email to