A 2016-10-04T22:49:10 +0200, Bram Moolenaar escreveu: > > João Miguel wrote: > > > While I thought "-" was an option, it actually isn't (see > > http://lists.gnu.org/archive/html/bug-coreutils/2016-10/msg00002.html). (...) > > If "vim -- -" reads from stdin, then how do you edit a file name "-"? > The current behavior is needed for that. That's what I thought, it was a bug in the coreutils ("cat -- -" does the same as "cat -"). But no, POSIX specifies this precisely (- should be consistent). To open a file named "-", use "vim ./-", the same way you would use "cat ./-" to dump a file's contents to stdout, or "vim ../-" to open a file named "-" in the directory above.
The point is, "-" is specified not to be an option by POSIX. If you used getopt, making it an option would actually be impossible (by design). As appealing as it may sound, "vim -- -" should therefore *not* have the effect of "vim ./-" - also note the latter is 1 character shorter. Regards, 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.
