Hello,

While I thought "-" was an option, it actually isn't (see
http://lists.gnu.org/archive/html/bug-coreutils/2016-10/msg00002.html).
It seems POSIX simply specifies that if the argument provided is "-",
stdin should be read. So "vim -- -" should do the same as "vim -" and
not "vim ./-". The behaviour in vim is the same as in vi, but not as in
ed, or any other utilities I checked (they either consider "-" always
stdin or always a file named -).

Here:
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html
it is shown in guideline 10 that "--" should only end options. As "-" is
an operand, it should not be affected.

I'm aware "vim --help" says "Only file names after this" for "--", but
POSIX says "--" means options end, which is not quite the same. In fact,
perhaps you would agree with this: a comment in line 625 of "main.c"
says «If "-" argument given: Read file from stdin».

Looking forward to hear from you,
João Miguel

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