Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Dynamic parameters for PROMPT_SUBST functions
- X-seq: zsh-users 24936
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Sebastian Stark <sstark+zsh@xxxxxxxxxxx>
- Subject: Re: Dynamic parameters for PROMPT_SUBST functions
- Date: Fri, 19 Jun 2020 10:56:40 +0000
- Cc: zsh-users@xxxxxxx
- In-reply-to: <20200619063233.zybs27xvqp56t4p5@singold>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20200619063233.zybs27xvqp56t4p5@singold>
- Sender: zsh-users@xxxxxxx
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