zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: terminal resizing and prompt problem
Date: Sat, 10 Jul 2004 22:56:13 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.60.0407102241010.24945@toltec.zanshin.com> (raw)
In-Reply-To: <20040711002054.3d469d20@localhost>

On Sun, 11 Jul 2004, Nathan Sommer wrote:

> Am I correct in concluding from your reply that it is impossible to have 
> a multi-line zsh prompt and not get any extra lines after resizing a 
> terminal?

It's impossible to have a multi-line value of $PS1 withoug getting extra
lines after resizing.

However, it occurs to me that you can make it look pretty much the same by 
printing the first line yourself in the precmd function and having the 
second line as the value of $PS1.

E.g.

 precmd() { print -rP $'\e[1;32m[%d]\e[0m' }
 PS1=$'%{\e[1;34m%}[%T]%{\e[1;32m%}%%%{\e[0m%} '

Incidentally, I also use fvwm, but I almost never resize a window by 
dragging.  I have a title-bar button using a function for "Maximize 0 100" 
and simply toggle back and forth between having the window be the full 
height of the display, and whatever height it started at.  What's the 
point of mucking around with anything in between?


  reply	other threads:[~2004-07-11  5:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-10 21:25 Nathan Sommer
2004-07-11  3:41 ` Bart Schaefer
2004-07-11  4:20   ` Nathan Sommer
2004-07-11  5:56     ` Bart Schaefer [this message]
2004-07-11 19:59       ` Nathan Sommer

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=Pine.LNX.4.60.0407102241010.24945@toltec.zanshin.com \
    --to=schaefer@brasslantern.com \
    --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).