Tuesday, October 23, 2012

gvim --help

What magic is gvim doing to hide its documentation?

I understand this:
[marc@nixos:~]$ gvim --help 1> /tmp/file; ls -l /tmp/file
3326 (bytes in /tmp/file)

I'd expect stdout to be printed to my console
[marc@nixos:~]$ gvim --help 2> /tmp/file; ls -l /tmp/file
0 (bytes in /tmp/file)

I'd expect stdout to be written to the file
[marc@nixos:~]$ bash -c "(gvim --help) >/tmp/file 2>&1" ; ls -l /tmp/file
0 (bytes in /tmp/file)

So why is gvim hiding its documentation when stderr is redirected to a
file?

Marc Weber

--
You received this message from the "vim_use" 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

No comments: