>2>&1 is a redirection too: in Unix-like shells, it means to redirect stderr
>(handle 2) to wherever stdout (handle 1) is going. (You see there the parency
>between Dos 2.0 and higher, and Unix: in both, file descriptors 0-2 are stdin,
>stdout and stderr in that order. Or maybe it traces back via Dos 1.0 and CP/M,
>I'm not sure.)
>If stdout is later redirected, stderr does not follow it, so to redirect both
>you would use "program > filename.log 2>&1". This is exactly what happens in
>your case, albeit with a more complicated output filename.
I have now tried the command string with ">file.txt 2>&1" included, and the command window executes it without complaint. The result is a file of zero length. It is possible that Vim gets unhappy when it tries to open the output file, because it gets an immediate end-of-file.
>see above, and also the various shell-something options
> :set wildmenu
> :help 'shell<Tab> or
> :help 'shell<Ctrl-D>
>where each <> notation means one keystroke.
>Checking those lets me believe that you have 'shellredir' set to ">%s 2>&1"; I
>don't know whether cmd.exe recognises it.
Indeed, :help 'shell<Tab> produces a list of items, one of which is 'shellredir', so I can presumably change that if I wish (or need) to.
>Are you sure you aren't using a Unix-like Vim (such as Vim for Cygwin) with a
>Dos-like shell (such as cmd.exe)? Check
> :echo has("unix")
I am using whatever comes with "cream." I first found it on April 26. The result of ":echo has("unix")" is 0.
Thanks VERY much! I really appreciate the quality and depth of your reply!
While the ink was still drying on the United States Constitution in 1787, Benjamin Franklin observed: "Only a moral and virtuous people are capable of freedom; the more corrupt and vicious a society becomes, the more it has need of masters."
-- Pat Boone 5/5/2007