From: DervishD <zsh@dervishd.net>
To: Mike Hernandez <sequethin@gmail.com>
Cc: Zsh Users <zsh-users@sunsite.dk>
Subject: Re: Silent shell but not silent script
Date: Fri, 2 Sep 2005 16:22:52 +0200 [thread overview]
Message-ID: <20050902142252.GA451@DervishD> (raw)
In-Reply-To: <3060c23905090204302b8c1d91@mail.gmail.com>
Hi Mike :)
* Mike Hernandez <sequethin@gmail.com> dixit:
> On 9/2/05, DervishD <zsh@dervishd.net> wrote:
> > Sometimes the command I have to run won't exist, so zsh will
> > issue that error. How the heck can I make zsh not to spill the error
> > message but at the same time let the command to use stderr and
> > stdout? I mean, I can silent zsh doing this:
> Why not test to see if the command exists before doing anything
> with it? Something like if [ -x $command ] ?
Because that's not enough, I'm afraid. If the command is an
script with a bangpath and the interpreter doesn't exist, the
"[[ -x command ]]" test will succeed but the execution will fail. By
the way, in that case zsh will return 127 instead of the correct 126,
although if I recall correctly, that has been dealt with in latest
CVS :?
Thanks for your suggestion :) I'm looking for something in that
line, but it's quite difficult. It has to be portable or at least
work in zsh and bash, that will cover nearly 90% of the boxes, and
that's a problem by itself.
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...
next prev parent reply other threads:[~2005-09-02 14:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-02 11:09 DervishD
2005-09-02 11:30 ` Mike Hernandez
2005-09-02 14:22 ` DervishD [this message]
2005-09-02 15:34 ` Bart Schaefer
2005-09-02 16:03 ` DervishD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050902142252.GA451@DervishD \
--to=zsh@dervishd.net \
--cc=sequethin@gmail.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).