John Beckett wrote:
Charles Campbell wrote:
So, how best to make this work?  I was thinking

   if has("win32") || has("win95") || has("win64") || has("win16")
    if executable("cmd")
     let g:netrw_localmovecmd= "cmd move"
    endif
endif
No, as Ben said it would have to be "cmd /c move" and that's
just going to cause trouble somewhere. Someone could have
another shell which is very likely to implement those basic
commands, and then there would be unnecessary confusion.

I think it would be best to NOT test when under Windows because
there is no reasonable way to do so. If there were a reasonable
way for a script to store persistent data, you could consider
displaying a message the first time one of the commands is
invoked, letting the user know that netrw will use 'move',
'mkdir', 'rmdir' as a default (lot of hassle and potentially
fragile code!).
I suppose that I could test for executable("cmd"), and assume that move/rmdir/mkdir will work if cmd is on the path. Is that right?

Regards,
Chip Campbell

--
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

Raspunde prin e-mail lui