Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Is there some postexec function?



Reply to message «Is there some postexec function?», 
sent 19:39:43 06 July 2011, Wednesday
by Pascal Wittmann:

I personally use
    RPS1="%(?.."%{$'\033[33m\033[41m\033[1m'%}"%?"%{$'\033[0m'%}")"
, but it will draw the exit code only in next prompt (and only in the last one).

Can I ask how are you going to modify existing prompt? I know a way to modify 
the current line, but I don't know what to do if I want to modify the line after 
LF was fed to the terminal.

Original message:
> Hi,
> 
> I wonder whether there exists a postexec function, a function that is
> called, after a command is executed. I need something like that, because
> I'm trying to print (redraw the prompt) the exit code of a program in
> the prompt where it was called.
> 
> I've found some references¹ to such a function, but they didn't worked
> on my system. I'm using zsh 4.3.12.
> 
> 
> Thanks for your help,
> Pascal Wittmann
> 
> 
> [1] https://gist.github.com/47474

Attachment: signature.asc
Description: This is a digitally signed message part.



Messages sorted by: Reverse Date, Date, Thread, Author