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

61784Re: [Bug][w32] Completion for "filetype" doesn't work on windows

Expand Messages
  • Dominique Pellé
    Jun 25, 2011
      John Beckett wrote:

      > Dominique Pellé wrote:
      >> It works for me on Linux too.  I don't have Windows to test.
      >> I don't see why it would not work on Windows at first sight.
      > I have just performed some tests on Windows XP:
      > These work (pressing Tab provides argument completion):
      >  :command! -nargs=* -complete=file Xfil :echo <q-args>
      >  :command! -nargs=* -complete=syntax Xsyn :echo <q-args>
      >  :command! -nargs=* -complete=environment Xenv :echo <q-args>
      > This fails (pressing Tab for completion does nothing):
      >  :command! -nargs=* -complete=filetype Xft :echo <q-args>
      > The reason filetype completion fails on Windows is that
      > dos_expandpath() in misc1.c is asked to expand text like
      > "C:\.../vimfiles/{syntax,indent,ftplugin}/*.vim".
      > The "{dir1,dir2}" syntax is handled by the operating system on
      > Unix based systems, but not on Windows.
      > John

      Thanks John. You're probably right about the {dir1,dir2}
      glob expression not being portable.

      Attached patch avoids such glob expression and should
      thus be more portable. I can only test it on Linux so I would
      appreciate if someone else can confirm that it fixes the bug
      on Windows.

      -- Dominique

      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
    • Show all 14 messages in this topic