On 8/21/06, Martin Bähr <[EMAIL PROTECTED]> wrote:
> hi,
>
> i managed to backport the latest fish version (1.21.10) from debian
> unstable to ubuntu dapper, to verify that bugs i find are still there
> and not bore you with outdated reports...
>
> here are a few small bugs in 1.21.10:

Thank you for the report.

>
> 2>&1 only redirects to a file but not to a pipe.

I am not sure if I undestand this correctly. If I got this wrong,
please reexplain.

My interpretatin of this is that are doing something like

foo 2>&1 | bar

and would expect bar to get the output of foo. In fish, that is not
how IO redirection works. In fish, IO redirection is done on a per-job
basis, so adding '2>&1' to any part of the job will result in stderr
of _all_ processes in the pipeline to be redirected to pipe 1. And
this happens at the level above pipes, so all stderrs will in fact be
redirected to the standard out of the last process in the job, i.e. to
the screen. The simple way to do what I'm guessing you want to do is
to use a bit of syntactic sugar (one of the few in fish) to specify
that you want to pipe using a different file descriptor using the
following:

foo 2>| bar

When I implemented the per-job IO redirection, I didn't really think
about how other shells did this, I simply though IO was something that
is much more intuitive to think about at the job-level. For example,
it is not uncommon for me to wish to redirect stderr of _all_
processes in a job to a file (when I am dilligient) or to /dev/null
(when I am lazy).

Since then, the error in my original way has been pointed out to me. I
still like the current method better, since I don't have to do e.g.

begin; foo|bar; end 2>/dev/null

to ignore all error messages, but there is a chance that fish will be
changed to use per-process IO redirection in the future if enough
people give enough good arguments why this is better.

For now, if you want to do per-process io redirection in a pipeline,
do something like this:

begin; foo 2>&1; end | bar

or, as pointed out above, fish has special syntactic sugar for
changing the output fd in pipes:

foo 2>| bar

> ctrl-c in the tab pager only kills the pager, but not the output being
>   paged, so that the output now scrolls accross the terminal...

Not 100% sure what you mean here either. If you hit control-c instead
of hitting e.g. escape, then the original contents of the terminal
will not be restored. Is that the behaviour you mean? If so, then I
guess it wouldn't be hard to install a signal handler to tell the
terminal to restore itself before exiting. If you are seeing more
completions printed to the screen after hitting ^C then this is a bug
that I can't reproduce on my (fedora) system. If so, is there any
additional information you can provide me with to help track this
down?

> ctrl-c and ctrl-u do not clear the commandline as they should but
>   are simply ignored.

These work for me under Fedora. I not that these two keybindings are
among the ones that are defined in /etc/fish_inputrc. Is it possible
that this file is not read on startup? Specifically, what is the value
of the $INPUTRC variable, and what is the contents of said file?

>
> greetings, martin.
> --
> cooperative communication with sTeam      -     caudium, pike, roxen and unix
> offering: programming, training and administration   -  anywhere in the world
> --
> pike programmer   travelling and working in europe             open-steam.org
> unix system-      bahai.or.at                        iaeste.(tuwien.ac|or).at
> administrator     (caudium|gotpike).org                          is.schon.org
> Martin Bähr       http://www.iaeste.or.at/~mbaehr/
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


-- 
Axel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to