Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Wish for rprompt feature
- X-seq: zsh-users 7261
- From: Thorsten Kampe <thorsten@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Wish for rprompt feature
- Date: Wed, 24 Mar 2004 21:25:33 +0100
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <cmy4g3am024u$.dlg@xxxxxxxxxxxxxxxx> <1040320171038.ZM18075@xxxxxxxxxxxxxxxxxxxxxxx> <mu9we9i1qx3p.dlg@xxxxxxxxxxxxxxxx> <1040321012959.ZM18687@xxxxxxxxxxxxxxxxxxxxxxx>
- Sender: news <news@xxxxxxxxxxxxx>
* Bart Schaefer (2004-03-21 02:29 +0100)
> On Mar 20, 7:12pm, Thorsten Kampe wrote:
> } Customising your prompt so that it works like rprompt plus the "[...]"
> } would require zsh skills beyond mine.
>
> It'd require skills beyond mine, too, without modifying the C code. As
> usual with zsh prompts, RPS1 is computed exactly once (before the line
> editor starts up for each command) and thereafter the code only knows
> how long it is, to know when the input line overlaps with it and hence
> to stop showing it.
>
> However, try this (requires 4.2.0) and see what you think:
>
> zle-line-init() {
> POSTDISPLAY=" ${(%)RPS1}"
> }
> zle -N zle-line-init
Looks interesting. But I cannot test your solution as thoroughly as it
deserves because it doesn't recognize the Prompt sequences in my
rprompt ($cyan, $reset_color[1]).
Could you modify your "zle-line-init/POSTDISPLAY" solution so the
colours in my prompt are shown?
Thanks, Thorsten
[1]
[~/.zshrc]
autoload -U colors; colors
cyan=$fg_no_bold[cyan]
RPROMPT='%{$cyan%}%~%{$reset_color%} %h:%i'
Messages sorted by:
Reverse Date,
Date,
Thread,
Author