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

RE: Bug in filename completion on NT

Expand Messages
  • Vince Negri
    ... in ... $. ... I believe this is because of line 2196 of ex_getln.c: p = vim_strsave_escaped(cmd_files[i], #ifdef BACKSLASH_IN_FILENAME (char_u *)
    Message 1 of 2 , Jul 5, 2000
      Moore, Paul wrote:
      > Hi,
      > If I try to tab-complete a filename with a "$" sign in it, the $ is
      > backslash-escaped, when it shouldn't be. You get this when trying to
      > complete UNC filenames for files on "hidden" shares (which have a final $
      in
      > the sharename) on NT. For example, assuming you have such a share, typing
      >
      > :e \\MYSERVER\C$\WINN<tab>
      >
      > will complete the WINN to WINNT, but will also add a backslash before the
      $.
      > This makes the filename invalid :-(

      I believe this is because of line 2196 of ex_getln.c:

      p = vim_strsave_escaped(cmd_files[i],
      #ifdef BACKSLASH_IN_FILENAME
      (char_u *)" *?[{`$%#"
      #else
      # ifdef COLON_AS_PATHSEP
      (char_u *)" *?[{`$%#/"
      # else
      (char_u *)"
      *?[{`$\\%#'\"|"
      # endif
      #endif


      ... which escapes the '$'s in any filename resulting from
      expansion/completion. You could try removing the $ from the
      BACKSLASH_IN_FILENAME lilst, I don't know if it'll break the
      handling of paths with envvars like $VIM/_vimrc etc.

      Vince



      --
      Vince Negri (vnegri@...)
      Application Solutions Ltd. Tel:+44(0)1273-476608 Fax:+44(0)1273-478888
      Legal Disclaimer: Any views expressed by the sender of this message are
      not necessarily those of Application Solutions Ltd. Information in this
      e-mail may be confidential and is for the use of the intended recipient
      only, no mistake in transmission is intended to waive or compromise such
      privilege. Please advise the sender if you receive this e-mail by mistake.
    Your message has been successfully submitted and would be delivered to recipients shortly.