2016-01-19 21:52 GMT+03:00 Gary Johnson <[email protected]>:

> On 2016-01-19, Bram Moolenaar wrote:
> > James McCoy wrote:
>
> > > Why does the behavior differ?  Shouldn't it be consistent?
> > >
> > > Both Windows and UNIX asked you to have a file with a space in the
> name.
> > > In fact, :argedit's help calls out that only one filename is allowed.
> >
> > Yeah, this has a long history.  On Unix:
> >       :edit a b
> > Gives an error.  On MS-Windows you edit the file "a b".
> > This is explained above ":he wildcard".
> >
> > We can't change it on MS-Windows without breaking things.
> >
> > Could we change this on Unix?  Currently it's an error, so one might
> > think it would not cause a problem. It's as simple as removing the check
> > for SPACE_IN_FILENAME.  Although there is some other code when searching
> > for NOSPC.
> >
> > The main problem will be trying to use ":edit one.c two.c", expecting to
> > edit two files.  Now you get an error, after the change you just edit a
> > file with a weird name.
>
> On Unix, a space is a separator.  Spaces in file names require
> quoting.  I don't think Vim should violate that convention here just
> because it can.  It would be horribly inconsistent.
>

​Space is not a separator on *Unix*. This is a *shell* where space is a
separator and shells on windows *also* treat spaces as separators.​ Main
difference is that not *all* spaces are separators in cmd.exe (dunno about
powershell): basically the only place where it is guaranteed to have space
as a separator is a single space after the command name because all other
spaces (except those before and after operators like `&` or `|`, which are
not separators as well) are parsed by the program itself and not the shell.
But this is *in cmd.exe* (and, maybe, in powershell) while you can install
bash and other *nix shells on windows. Also note that standard library used
for parsing arguments to argument list treats spaces as separators on
windows as well, and it is used by most of console applications, so you
will hardly notice the difference in most cases.



>
> Just my $0.02.
>
> Regards,
> Gary
>
> --
> --
> 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
>
> ---
> You received this message because you are subscribed to the Google Groups
> "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui