Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Execute a Command in PS1 w/o Disturbing Previous Return Value?
- X-seq: zsh-users 7848
- From: Phil!Gregory <phil_g@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Execute a Command in PS1 w/o Disturbing Previous Return Value?
- Date: Sun, 15 Aug 2004 11:17:24 -0400
- In-reply-to: <0A5C860F-EE0C-11D8-83BE-000502631FBD@xxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <Pine.LNX.4.61.0408130204340.15905@xxxxxxxxxxxxxxxxxx> <0A5C860F-EE0C-11D8-83BE-000502631FBD@xxxxxxxxxxxxxx>
* Aaron Davies <agdavi01@xxxxxxxxxxxxxx> [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
---- --- --
Messages sorted by:
Reverse Date,
Date,
Thread,
Author