Closed ichizok closed 6 years ago
vaffle.vim behaves wrong on a directory whose path includes a dollar sign.
On unix-like system.
Preparation: create sample directories.
$ ls $ mkdir -p \$foobar $ mkdir -p \$foobar/001 $ touch \$foobar/002
($foobar is empty)
$foobar
vimrc:
set rtp+=/path/to/vaffle.vim
Start Vim with vaffle.vim:
vim -Nu vimrc .
Display:
$foobar/
Feed key l (move into $foobar),
l
Expected:
001/ 002
Actual:
/
A string starting with dollar sign is expanded as env variable by glob(), expand(). It should be escaped by fnameescape() properly.
glob()
expand()
fnameescape()
Problem
vaffle.vim behaves wrong on a directory whose path includes a dollar sign.
Repro steps
On unix-like system.
Preparation: create sample directories.
(
$foobar
is empty)vimrc:
Start Vim with vaffle.vim:
vim -Nu vimrc .
Display:
Feed key
l
(move into$foobar
),Expected:
Actual:
Cause
A string starting with dollar sign is expanded as env variable by
glob()
,expand()
. It should be escaped byfnameescape()
properly.