On Wed, 21 Dec 2005, Netocrat wrote:

> Axel Liljencrantz wrote:
> > On Tue, 20 Dec 2005, Netocrat wrote:
> >
> >>I can't find a way to suppress the error message generated by an attempt
> >>to run an unknown command.  Redirection of stderr or stdout has no
> >>effect, nor does it make a difference whether the situation is
> >>interactive or scripted.  This is a pretty useful thing to be able to
> >>do, especially in scripts.  Does fish have an existing mechanism that
> >>I'm missing?
> >
> > There is no mechanism, other than redirecting the stderr of _fish
> > itself_ to /dev/null, which can only be done at startup.
> >
> > Suggestions of a simple and discoverable general purpuse way of doinf
> > this is welcome.
> >
> > Some possible methods:
> >
> > * Allow the user to change the debug level at runtime
> > * Allow the user to redirect stderr at runtime
> > * Do some magic to attempt to skip redirect parse errors on commands
> > where stderr is redirected. This may be arbitrarily hard for
> > moderatly broken syntax.
>
> Assuming non-broken syntax is reasonable since this is most useful in
> otherwise well-formed scripts.  I'd find redirection of shell-generated
> error messages to the same place as the command/builtin/function/block's
> stderr whereever possible pretty useful behaviour.

I guess. It will require some code changes to be able to output as
many things as possible through redirections, definitely won't be in
1.19.0.

>
> The first two ideas may have merits of their own (e.g. for broken
> syntax) but for the situations I envisage they're unnecessary.

They may.

>
> --
> http://members.dodo.com.au/~netocrat

-- 
Axel


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to