On 8/15/06, Alexander 'boesi' Bösecke <[EMAIL PROTECTED]> wrote:
Hi
Am 09.08.2006 13:49:15 schrieb Alexander 'boesi' Bösecke:
Well all the discussion about single and double quoted didn't solve my
problem - the completion of a filename adds a \ before a space.
Try the following:
:let s = "g:\\CS\ Simple\\"
:echo s
g:\CS Simple
As you can see the additional \ is removed. I think the same happens in
the following, because it just works:
:e g:\CS\ Simple\run.pyw " Here I've used file completion
But when using input(...), the \ isn't removed. And the problem is now,
that filereadable doesn't accept that.
So the question is, where is the bug?
The bug is in completion in the input() function.
Since filename is unlikely to begin with whitespace, you have a workaround:
let fn = input('Mainfile: ', expand('%:p'), 'file')
fn = substitute(fn, '\\ ', ' ', 'g')
Yakov