w32 gvim expand("[b...]") = "b" if current directory contains /b folder

7 views
Skip to first unread message

haron

unread,
Mar 1, 2008, 5:03:19 AM3/1/08
to vim_use
Looks like expand() recognizes "[<letter>...]" construct as name
of directory <letter>, if directory <letter> is contained in
current directory. In ":help expand" isn't mentioned any special
meaning for "[]" characters. They seems to have effect only if
there both - left and right "[" "]" square brackets are present.
Is this is a desired behavior ? If not, I will may be try to look
to expand() implementation ?

Example, demonstrating the "problem":

$ cd c:\tst
$ dir /s/b
c:\tst\b
c:\tst\c
$ gvim -u NONE -U NONE
:echo expand("[BufferExplorer]")
b
:echo expand("[CufferExplorer]")
c
:echo expand("BufferExplorer")
BufferExplorer
:echo expand("CufferExplorer")
CufferExplorer
:echo expand("[BufferExplorer")
[BufferExplorer
:cd ..
:echo expand("[BufferExplorer]")
[BufferExplorer]
:echo expand("[CufferExplorer]")
[CufferExplorer]

Just one (beginners) assumption - can it have something to do
with code for handling VMS paths ?

PS: :version
VIM - Vi IMproved 7.1 (2007 May 12, compiled Feb 21 2008 07:14:56)
MS-Windows 32 bit GUI version with OLE support
Included patches: 1-262
Compiled by digit...@SPAMdancingpaper.com
Big version with GUI. Features included (+) or not (-):
[...]

PPS: I start own topic for this, because it has nothing to do
with "crash w32 gvim", for full history please refer to
http://groups.google.com/group/vim_use/browse_thread/thread/89ac59e14f97e953#
"crash w32 gvim 7.1 (2007 May 12) with BufExplore"

A.Politz

unread,
Mar 1, 2008, 11:00:17 AM3/1/08
to vim...@googlegroups.com
haron wrote:

>Looks like expand() recognizes "[<letter>...]" construct as name
>of directory <letter>, if directory <letter> is contained in
>current directory. In ":help expand" isn't mentioned any special
>meaning for "[]" characters.
>
>

It's called a wildcard and is mentioned somewhere
at the top as 'file globbing' or something.

:h wildcards

-ap


--
:wq

haron

unread,
Mar 1, 2008, 11:56:43 AM3/1/08
to vim_use

On 1 мар, 17:00, "A.Politz" <poli...@fh-trier.de> wrote:
> It's called a wildcard and is mentioned somewhere
> at the top as 'file globbing' or something.

I just wondering, how can I oversee something so obvious ! I even use
this kind of patterns in bash very often. Thank you very much, my
"issue" is solved.
Reply all
Reply to author
Forward
0 new messages