Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Prompt exit code return
- X-seq: zsh-users 16132
- From: Andrei Onoie <bollovan@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Prompt exit code return
- Date: Thu, 14 Jul 2011 16:51:59 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=+Hy1mJkx5KvNTmTIQhqqz9xHt2U27ikI8utYAafUZXk=; b=xp955Y5YhIOqUET3UxtYXEs7AX7Tub28kQfAMwujLxomIpehsDnoXOTRUjtsOPhHEZ Qef6f9wsJPnu0iGBXGtaRd02058OlEAVloL+IuJ1uSaaE/LWq9q/zV+jqpCrKSvAXQzB gdZ51CcD2NrPWFcii81UIMIBXyrHi3ERBuEvo=
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hello there.
This is my $PS1 var:
PS1='%(?.%F{green}.%F{red})%#%f '
So it is green if exit code is 0 and red if it is not...
So when exit code != 0 , it is red no matter how much you hit return..
I want for %# to be red if exit code != 0 only after the command is
finished,and then after I hit return it is green again...I was thinking
there could be a postcmd() like precmd but that wouldn't work would it?
Thanks in advance
Messages sorted by:
Reverse Date,
Date,
Thread,
Author