zsh-users
 help / color / mirror / code / Atom feed
From: nirva@ishiboo.com (Danny Dulai)
To: zsh-users@sunsite.auc.dk
Subject: Re: clear to end of display
Date: 19 Mar 2000 07:08:08 -0000	[thread overview]
Message-ID: <Liam.953449688.206618.31409.221164914@fizz> (raw)
In-Reply-To: <1000319035053.ZM32550@candle.brasslantern.com>

>If it's always in the upper right, you might try printing it with a
>TRAPALRM() function rather than putting it in the prompt.  Time values
>in the prompt don't get updated until after the next call to precmd(),
>but by setting a TMOUT value you can have it updated almost as often
>as you like (though I wouldn't recommend more often than about every
>10 seconds or it'll interfere with your typing).  I update the time
>in my xterm title bar that way, with a 60-second TMOUT.

That sounded like a good idea until I tried it out. xterms scrolled back
jump down, and often the time is not there because I'm a obsessive clearer
of my screen.

I went back to the prompt method and used the method you describe below and
everything is ok now.

>Try putting a cursor-up cursor-down movement in a %{...%} block at the
>beginning of your prompt.  That should force the prompt to be no higher
>than the second line without needing to hack any zle widgets.  E.g. in
>3.1.6+ with an 80-column xterm:
>
>PS1="%{"$'\e7\e[1A\e[1B\e[1;1H'%E$'\e[1;72H'"%D{%I:%M:%S}"$'\e8'"%}%m%# "

This doesnt work.. if I use this prompt and then type clear, it clears the
date and leaves the machien name followed by a % on the top line..

For some reason, the up/down isnt forcing it to be on line 1 :( 

I added 2 ups and 2 downs, and it puts it on line 2 tho. dunno.. this is
the behavior i actually want (since my upper right mesg is really 2 rows),
so i don't really care too much.. but if you know why the single isnt
working, let me know :)

-- 
___________________________________________________________________________
Danny Dulai                                           Feet. Pumice. Lotion.
http://www.ishiboo.com/~nirva/                            nirva@ishiboo.com


  reply	other threads:[~2000-03-19  7:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-18  9:18 Danny Dulai
2000-03-18 10:54 ` clear to end of display / clear to end of line Danny Dulai
2000-03-18 18:10   ` clear to end of display Bart Schaefer
2000-03-18 22:55     ` Danny Dulai
2000-03-19  3:50       ` Bart Schaefer
2000-03-19  7:08         ` Danny Dulai [this message]
2000-03-19  7:49           ` 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=Liam.953449688.206618.31409.221164914@fizz \
    --to=nirva@ishiboo.com \
    --cc=zsh-users@sunsite.auc.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).