From: Alex Satrapa <grail@goldweb.com.au>
To: Zsh-Users List <zsh-users@zsh.org>
Subject: Re: trying to create a "|| failed" function
Date: Fri, 15 Mar 2013 12:55:41 +1100 [thread overview]
Message-ID: <C553B1A4-239C-49A9-98FD-1567C3F5936E@goldweb.com.au> (raw)
In-Reply-To: <CADjGqHu2rLLEReGyzBOnVbkvEiz+DCR3fMwjf11ACJGeds1q5A@mail.gmail.com>
On 15/03/2013, at 12:39 , TJ Luoma <luomat@gmail.com> wrote:
> foo || failed
>
> bar || failed
You could pass a parameter into failed:
foo || failed 'foo'
bar || failed 'bar'
Or go even further and have "failed" run the command:
notify_if_failed foo with parameters
Then notify_if_filed would contain run $@, evaluate the result and return the appropriate exit code, performing any required logging along the way.
next prev parent reply other threads:[~2013-03-15 2:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 1:39 TJ Luoma
2013-03-15 1:55 ` Alex Satrapa [this message]
2013-03-15 3:19 ` TJ Luoma
2013-03-15 5:08 ` Phil Pennock
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=C553B1A4-239C-49A9-98FD-1567C3F5936E@goldweb.com.au \
--to=grail@goldweb.com.au \
--cc=zsh-users@zsh.org \
/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).