I am using the fish
shell, which until this moment had been a perfect replacement of the good old bash
, but I came across the following problem.
fish
does not forward STDERR
to STDOUT
. Of course if I append ^^&1
(forwards stderr to stdout) to the command that I am running everything is ok, but that is not the default behaviour.
Example:
user@Computer ~> rm non_existing_file
user@Computer ~ [1]> rm non_existing_file ^&1
rm: non_existing_file: No such file or directory
user@Computer ~ [1]>
How do I fix that?
P.S. FTR I am running on OS X Mavericks
sh -c 'echo stdout; echo stderr >&2' >/dev/null
what output do you expect to see?rm non_existing_file
returns 1, but does NOT output anything. Only when I explicitly forward stderr to stdout of the command, like this:rm non_existing_file ^&1
I get:rm: non_existing_file: No such file or directory
.