From: aarons@execpc.com (Aaron Schrab)
To: zsh-users@math.gatech.edu (zsh users mailing list)
Subject: Re: problem with bold prompt
Date: Thu, 30 Jan 1997 18:14:01 -0600 [thread overview]
Message-ID: <19970130181401.PO21037@execpc.com> (raw)
In-Reply-To: <199701302313.SAA12620@rom.oit.gatech.edu>; from Will Day on Jan 30, 1997 18:13:25 -0500
On 30 Jan 1997, willday@rom.oit.gatech.edu (Will Day) wrote:
> This is a problem I've been fighting with for a long time, and which I only
> recently began to grasp, when it got worse after I upgraded from 2.5.03 to
> 3.0.2. :)
>
> My prompt is defined as:
> export PS1="^[[1m${HOSTNAME}:^[[m%d) "
> so that it appears as:
> rom:/home/willday)
> where the "rom" is bold.
>
> It looks like zsh is counting the formatting characters as printable
> characters on the command-line. Under 2.5.03, this would screw up
> command-recall, and ctrl-U line clearing.
Put the formatting characters inside %{ %} pairs:
export PS1="%{^[[1m%}${HOSTNAME}:%{^[[mi%}%d) "
this tells zsh not to count them.
--
Aaron Schrab <mailto:aarons@execpc.com> <http://www.execpc.com/~aarons/>
Exec-PC Internet Systems Administration <mailto:info@execpc.com> for auto info
next prev parent reply other threads:[~1997-01-31 0:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-01-30 23:13 Will Day
1997-01-31 0:08 ` Zefram
1997-01-31 0:14 ` Aaron Schrab [this message]
1997-01-31 4:23 ` Vidiot
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=19970130181401.PO21037@execpc.com \
--to=aarons@execpc.com \
--cc=zsh-users@math.gatech.edu \
/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).