Am 20.01.2012 12:43, schrieb Bram Moolenaar:
Any Wokula wrote:
(gVim 7.3.393, Windows/win32)
Cannot :cd into a sub-folder that starts with a space (e.g. " dir"):
:cd \ dir
E344: Can't find directory "dir" in cdpath
E472: Command failed
As the error messages suggests, the directory "dir" will be entered if
it exists.
Completion works ok:
:cd<Tab>
->
:cd \ dir
Best solution is to rename the directory.
Escaping rules are already very complicated. I'm not sure this can be
fixed without creating a new problem.
As I understand it: I don't think this is a problem with existing
escaping rules. On Windows, the backslash '\' in path names escapes
special characters like '%', '#' and ' ', but not itself. Thus the only
thing one cannot get is an unescaped space after a path separator '\':
'abc def' is 'abc' + unescaped space + 'def'
'abc\ def' is 'abc' + literal space + 'def'
'abc\\ def' is 'abc' + path separator + literal space + 'def'
'abc\\\ def' is 'abc' + two path separators + literal space + 'def'
I want to :cd into a directory starting with a literal space, this
should not be a problem.
It works if " dir" is a sub-sub-folder:
:cd abc\\ dir
changes directory to "abc\ dir" (where '"' means the quote used by
Windows).
--
Andy
--
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