zsh-users
 help / color / mirror / code / Atom feed
From: Thorsten Kampe <thorsten@thorstenkampe.de>
To: zsh-users@sunsite.dk
Subject: Re: Wish for rprompt feature
Date: Wed, 24 Mar 2004 21:25:33 +0100	[thread overview]
Message-ID: <10hss9qafrc2f$.dlg@thorstenkampe.de> (raw)
In-Reply-To: <1040321012959.ZM18687@candle.brasslantern.com>

* 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'


  reply	other threads:[~2004-03-24 20:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-19 11:41 Thorsten Kampe
2004-03-20 17:10 ` Bart Schaefer
2004-03-20 18:12   ` Thorsten Kampe
2004-03-21  1:29     ` Bart Schaefer
2004-03-24 20:25       ` Thorsten Kampe [this message]
2004-03-25  3:07         ` Bart Schaefer
2004-03-20 19:28   ` Wayne Davison
2004-03-21  0:00     ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='10hss9qafrc2f$.dlg@thorstenkampe.de' \
    --to=thorsten@thorstenkampe.de \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).