On 16-Jun-2012 09:23:26 -0700 (PDT), mattn wrote:
> [5 sentences deleted]
> You are talking about completion. I agree that completion
> should be applied wildignore. But user-own expanding shouldn't be
> applied.
Well, actually 'wildignore' applies not just to file completion (with <Tab>),
but also to expansion of globs like foo* (e.g. when using :args). The help on
'wildignore' is a little short on information, that's what my patch to the
documentation in this thread was about.
I understand this option as: When I put a pattern in there, Vim commands will
never open matching files. However, plugins may want to defy this user order;
that's why functions like glob() have an option to disable wildignore for it.
> I don't think, that backtick is applied to wildignore doesn't have any
> merit to users. When user want to use backtick, they don't expected
> the behavior.
As I said, I have no strong opinion here, other than my desire for consistency
in operation (and your proposed change would affect that consistency!). I have
hardly ever used backtick-expansion interactively, and I guess most Vim users
don't even know about this feature.
What I do care about is advice for plugin writers. I think just changing the
behavior of backtick expansion via your patch doesn't cut it. We need a clear
demarcation between
:edit `=file`
and
:execute 'edit' fnameescape(file)
Right now, the help unequivocally recommends use of fnameescape(). Based on what
I learned through our discussion, this is bad advice for cases where the file
name may be interpreted as a file glob, like [a-z]. In case there's a matching
file, the first will correctly open the strange file, but the second will open
the match or even cause an error.
>> E480: No match: `='*'`
>> Shouldn't the backtick-expansion result always be taken literally? It
>> looks like it mistakenly performs a glob here!
>
> My fix will solve this.
Well sure, you mask the problem by ignoring 'wildignore', which is related to
globbing. I just hope that there's not still a deeper underlying problem.
-- regards, ingo
--
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