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

Re: get output of a command in prompt



Le Saturday 16 September 2006, à 21:01:55PM +0200, Frank a écrit : 
> arno. <arno.@xxxxxxxxxx>:
> [..get output of command into prompt..]
> 
> Take a look at this:
> 
> [snip]
> zsh% PS1='$(printf "%s: %d" "This is a one" 1)-%% '
> $(printf ": /home/hawk" "This is a one" 1)-% setopt promptsubst 
> This is a one: 1-%
> [snap]

Yes, I've tried things like that, but the problem is that command output 
will be evaluated once, just when prompt is set up. It will not be 
evaluated each time prompt is displayed

arno

Attachment: signature.asc
Description: Digital signature



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