Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Zsh clears prompt line. Feature or bug?
- X-seq: zsh-workers 21118
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Zsh clears prompt line. Feature or bug?
- Date: Fri, 08 Apr 2005 10:09:27 +0000
- In-reply-to: <4374.1112949824@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <1dc4e3890504061159601fb049@xxxxxxxxxxxxxx> <20050407172756.GA16416@DervishD> <1dc4e38905040711017a63b0ba@xxxxxxxxxxxxxx> <20050407181536.GD16712@DervishD> <1050407225513.ZM17729@xxxxxxxxxxxxxxxxxxxxxxx> <4374.1112949824@xxxxxxxxxxxxxxxxxxxxxxx>
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?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author