Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: problem with bold prompt
- X-seq: zsh-users 642
- From: aarons@xxxxxxxxxx (Aaron Schrab)
- To: zsh-users@xxxxxxxxxxxxxxx (zsh users mailing list)
- Subject: Re: problem with bold prompt
- Date: Thu, 30 Jan 1997 18:14:01 -0600
- In-reply-to: <199701302313.SAA12620@xxxxxxxxxxxxxxxxxx>; from Will Day on Jan 30, 1997 18:13:25 -0500
- References: <199701302313.SAA12620@xxxxxxxxxxxxxxxxxx>
On 30 Jan 1997, willday@xxxxxxxxxxxxxxxxxx (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@xxxxxxxxxx> <http://www.execpc.com/~aarons/>
Exec-PC Internet Systems Administration <mailto:info@xxxxxxxxxx> for auto info
Messages sorted by:
Reverse Date,
Date,
Thread,
Author