zsh-users
 help / color / mirror / code / Atom feed
From: Phil!Gregory <phil_g@pobox.com>
To: zsh-users@sunsite.dk
Subject: Re: Execute a Command in PS1 w/o Disturbing Previous Return Value?
Date: Sun, 15 Aug 2004 11:17:24 -0400	[thread overview]
Message-ID: <20040815151724.GB5366@mithrandir.aperiodic.net> (raw)
In-Reply-To: <0A5C860F-EE0C-11D8-83BE-000502631FBD@louisville.edu>

* Aaron Davies <agdavi01@louisville.edu> [2004-08-14 12:07 -0400]:
> I dunno, I can see where someone might want a prompt so complicated it 
> needed internal error-handling based on return value of executed 
> commands (cat foo || cat bar, etc.). Would "fixing" this prevent that?

Shouldn't.  IIRC, the code for precmd is as simple as saving $? at the
beginning and then restoring it at the end.

(I ran into this problem a while ago and solved it by simply moving all
execution into precmd().)

-- 
...computer contrarian of the first order... / http://aperiodic.net/phil/
PGP: 026A27F2  print: D200 5BDB FC4B B24A 9248  9F7A 4322 2D22 026A 27F2
--- --
You can't wake a person who is pretending to be asleep.
                       -- Navajo Proverb
---- --- --


      reply	other threads:[~2004-08-15 15:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-13  3:35 Aaron Davies
2004-08-13  4:52 ` Philippe Troin
2004-08-13 17:32 ` Bart Schaefer
2004-08-14 16:07   ` Aaron Davies
2004-08-15 15:17     ` Phil!Gregory [this message]

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=20040815151724.GB5366@mithrandir.aperiodic.net \
    --to=phil_g@pobox.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).