Am 2016-09-01 07:41, schrieb Dominique Pellé:
Manuel Ortega <mannyvim...@gmail.com> wrote:
The docs at :h file-pattern don't mention it, but I seem to be able to
use
"\=" just fine in autocmd patterns, and it seems to mean what it means
in :h
pattern-overview ("zero or one").
For instance, `au SomeGroup *.[xgb]z2\= some_command` will fire on
files
with any of the following extensions:
.xz
.gz
.bz2
.bz
Maybe this a fluke and it's not supposed to work this way. But if it
is
supposed to work this way it should be in the docs at :h file-pattern
-Manny
I think that it's not expected and I see it a bug.
glob2regpat() gives what look like unexpected
results for:
:echo glob2regpat('a\=')
Actual: ^a\=$
Expected: ^a\\=$
:echo glob2regpat('a\+')
Actual: ^a\+$
Expected: ^a\\+$
:echo glob2regpat('a\d')
Actual: ^a\d$
Expected: ^a\\d$
And many probably many other cases
where \ is special in regexp, but not special
in glob special characters.
I believe this is not true. The documentation mentions this:
,----[ :h file-pattern ]-
| *file-pattern*
| The pattern is interpreted like mostly used in file names:
| * matches any sequence of characters; Unusual: includes path
| [...]
| \ special meaning like in a |pattern|
| [...]
`----
So one can expect '\=' to work like a regexp pattern.
Best,
Christian
--
--
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
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.