Loading ...
Sorry, an error occurred while loading the content.
 

Re: globpath() doesn't like paths ending with \.

Expand Messages
  • Bram Moolenaar
    ... [...] ... Note that you have , in there. This is used to include a comma in a directory name, thus Vim sees C: OPT PERL BIN,D: OPT TEXMF MIKT as the
    Message 1 of 6 , Feb 1, 2004
      Suresh Govindachar wrote:

      > >> Some of the directories in my windows path end with \ and
      > >> globpath() cannot find files in these directories. I found
      > >> this out by executing the following commands. (Although the
      > >> two commands below are written in multiple lines, they are
      > >> actually one line commands.)

      [...]

      > Here are the details:
      >
      > The following command (written in multiple lines but issued
      > as a single line):
      >
      > :echo $path |
      > let foo=substitute($path, ";", ",", "g") | echo(foo) |
      > let foo=substitute(foo, "\\\\,", ",", "g") | echo(foo) |
      > let foo=globpath(foo, "perl.exe") | echo(foo)
      >
      > resulted in the following 5 long-lines of output (wrapped by
      > the mailer -- "microsoft office" is the only directory with space):
      > ----------------------------------------------
      > C:\opt\Microsoft
      > Office\Office;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\OPT\PERL\BIN\;D:\OPT\TEXMF\MIKT
      > EX\BIN;C:\OPT\MSYS\1.0\BIN;C:\OPT\UTILS
      > C:\opt\Microsoft
      > Office\Office,C:\WINDOWS,C:\WINDOWS\COMMAND,C:\OPT\PERL\BIN\,D:\OPT\TEXMF\MIKT

      Note that you have "\," in there. This is used to include a comma in a
      directory name, thus Vim sees "C:\OPT\PERL\BIN,D:\OPT\TEXMF\MIKT" as the
      directory to search in.

      --
      Often you're less important than your furniture. If you think about it, you
      can get fired but your furniture stays behind, gainfully employed at the
      company that didn't need _you_ anymore.
      (Scott Adams - The Dilbert principle)

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
      \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
    Your message has been successfully submitted and would be delivered to recipients shortly.