Yasuhiro Matsumoto wrote: > When want to make command line completion, we use > -complete=customlist,XXX. But it can't work with candidates contain > spaces. For example, it can't treat 'C:\Program Files'. > > function! CompleteFunc(A, L, P) > echomsg string([a:A, a:L, a:P]) > return map(split(glob(a:A . '*'), "\n"), 'fnameescape(v:val)') > endfunction > command! -nargs=* -complete=customlist,CompleteFunc Test : > > Below is a patch. > > https://gist.github.com/3089589 > > Please check. > > However, I wonder why ExpandEscape() choose kind of context to escape. > > if (xp->xp_context == EXPAND_FILES > || xp->xp_context == EXPAND_FILES_IN_PATH > || xp->xp_context == EXPAND_SHELLCMD > || xp->xp_context == EXPAND_BUFFERS > || xp->xp_context == EXPAND_DIRECTORIES) > > Currently, vim script like above should escape candidates. But I'm > thinking escaping should work always for command line completion.
Thanks. I'll add it to the todo list. -- hundred-and-one symptoms of being an internet addict: 113. You are asked about a bus schedule, you wonder if it is 16 or 32 bits. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- 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
