pombreda / vcscommand

Automatically exported from code.google.com/p/vcscommand
0 stars 0 forks source link

Escaping in VCSCommandChdir #76

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. mkdir /tmp/foobar
2. bzr init '/tmp/foo*' (Probably for other VCS as well)
3. cd '/tmp/foo*'
4. vi test
5. :VCSVimDiff

What is the expected output? What do you see instead?

It should handle names with an asterisk gracefully and not perform any 
replacements on the path.

Instead I get: 
VCSCommand:  Vim(cd):E77: Too many file names

This is because /tmp/foo* matches to '/tmp/foo*' and '/tmp/foobar'.

What version of the product are you using? On what operating system?

This occurs in the current git version (bc6ac15f).
OS: Debian/sid

Please provide any additional information below.

The reason for this bug is that VCSCommandChdir uses escape(a:directory, ' ')
 to escape the path. This will only escape spaces. Use of fnameescape instead solves the issue for me. I attached a patch for this change.

Original issue reported on code.google.com by edelm...@fs.tum.de on 18 Mar 2011 at 5:12

Attachments:

GoogleCodeExporter commented 9 years ago
This patch is queued up for release in

http://repo.or.cz/w/vcscommand.git/shortlog/refs/heads/next

Thanks much!

Original comment by bob.hies...@gmail.com on 2 Jun 2011 at 10:29