Bug#542430: [vim] vim try to expand files or directories that contain ~ (when using tcsh shell)

gregory hainaut gregory.hainaut at gmail.com
Wed Aug 19 15:55:54 UTC 2009


Package: vim
Version: 2:7.2.245-2
Severity: normal
Tags: patch

--- Please enter the report below this line. ---

Hi,

To reproduce the bug. Just create a directory with a ~ (mkdir
-p /tmp/bad~dir). Then when you do a ":chdir /tmp/bad~dir", an error
is raised "E79: Cannot expand wildcards". 
As a side effect it is not possible to use a tags file in the bad~dir
or below (/tmp/bad~dir/tags) because it will no be seen by vim.

Note I have not tested all shell but the bug appears with the tsch
shell (and not zsh for example). So you must use this option "set
shell=/bin/tcsh\ -f".

Please find attached a patch that seems solve the problem not sure it
is the good solution (and works in all situations). Maybe a solution
will be to escaped ~ like '\~' before sending to the tcsh shell.

Note: Tcsh debian version is 6.14.00-7 

Best Regards,
Gregory


--- System information. ---
Architecture: i386
Kernel:       Linux 2.6.30.3-ghost

Debian Release: squeeze/sid
  500 unstable        ftp.fr.debian.org 
    1 experimental    ftp.fr.debian.org 

--- Package information. ---
Depends                   (Version) | Installed
===================================-+-====================
vim-common        (= 2:7.2.245-2)   | 2:7.2.245-2
vim-runtime       (= 2:7.2.245-2)   | 2:7.2.245-2
libacl1               (>= 2.2.11-1) | 2.2.47-3
libc6                    (>= 2.3.4) | 2.9-25
libgpm2                 (>= 1.20.4) | 1.20.4-3.2
libncurses5     (>= 5.6+20071006-3) | 5.7+20090803-1+b1
libselinux1             (>= 2.0.85) | 2.0.85-1


Package's Recommends field is empty.

Suggests         (Version) | Installed
==========================-+-===========
ctags                      | 
vim-doc                    | 
vim-scripts                | 20090211-1





-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_expansion.patch
Type: text/x-patch
Size: 851 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20090819/8a995941/attachment.bin>


More information about the pkg-vim-maintainers mailing list