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

Re: Dynamic parameters for PROMPT_SUBST functions



Sebastian Stark wrote on Fri, 19 Jun 2020 08:32 +0200:
> I am trying to have a function call in my prompt that gets the return 
> value of the last command as a parameter (%?).

What would you do with «%?» if you could get its value?

> In this example I write the parameter to a file, because if I just print 
> it it would get printed as a literal %? and expanded later and thus hide 
> the issue I am facing

You could also print to /dev/tty.

Cheers,

Daniel



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