zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: Zsh clears prompt line. Feature or bug?
Date: Fri, 08 Apr 2005 10:09:27 +0000	[thread overview]
Message-ID: <1050408100927.ZM18483@candle.brasslantern.com> (raw)
In-Reply-To: <4374.1112949824@trentino.groupinfra.com>

On Apr 8, 10:43am, Oliver Kiddle wrote:
} Subject: Re: Zsh clears prompt line. Feature or bug?
}
}   precmd() { print -n "${(l.$COLUMNS.)}\e7${(l.$COLUMNS..\b.)}\e8\015" }
} 
} That's 80 spaces, save cursor position, 80 backspaces, restore cursor.

Doesn't work for me.

For one thing, I have to use ${(l.COLUMNS+COLUMNS..\b.)} to get the
cursor back to where it started, because "\b" counts as 2 characters
in (l.80..\b.) so that only prints 40 of them.  I don't know what you
did differently to get \b to be a backspace *before* it was sized.
Maybe you have a cut'n'paste-o and it should be ${(pl.COLUMNS..\b.)} ?

And even then, my backspaces aren't destructive, so I can still select
the spaces that were printed.

The following works, but only if I have "enable reverse wraparound" on,
lack of which state I don't (yet) know how to detect:

  print -P "${(l.COLUMNS.. .)}${(pl.COLUMNS..\b.)}%E"

} The \015 is not part of it: that resets the font.

Huh?  $'\015' is just $'\r', isn't it?


  reply	other threads:[~2005-04-08 10:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-06 18:59 Joel Kaasinen
2005-04-07 17:27 ` DervishD
2005-04-07 18:01   ` Joel Kaasinen
2005-04-07 18:15     ` DervishD
2005-04-07 22:55       ` Bart Schaefer
2005-04-08  8:43         ` Oliver Kiddle
2005-04-08 10:09           ` Bart Schaefer [this message]
2005-04-08 10:15             ` Bart Schaefer
2005-04-08 11:00             ` Oliver Kiddle
2005-04-08 15:12               ` Bart Schaefer
2005-04-08 15:29                 ` DervishD
2005-04-08 16:23                   ` Bart Schaefer
2005-04-08 17:47                 ` Oliver Kiddle

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=1050408100927.ZM18483@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@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).