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

Re: Wish for rprompt feature



* 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