Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: prompt and prompt_cr option
- X-seq: zsh-workers 20470
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: prompt and prompt_cr option
- Date: Mon, 11 Oct 2004 15:11:43 -0700 (PDT)
- Cc: Jordan Breeding <jordan.breeding@xxxxxxx>
- In-reply-to: <546D60C2-1A06-11D9-B624-000A95A6C222@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <546D60C2-1A06-11D9-B624-000A95A6C222@xxxxxxx>
- Reply-to: zsh-workers@xxxxxxxxxx
On Sat, 9 Oct 2004, Jordan Breeding wrote:
> Is there a way to force zsh to check to see if the last character that
> was printed was a newline and if it wasn't to just print one before it
> issues the carriage return?
No. There's no way, in general, for zsh to know what characters were
previously output to the terminal (or for any process to know what any
other process has done with a shared device).
For certain types of terminals you might be able to query the current
cursor position and do something clever when it is not in column zero, but
it's been deemed more trouble than it's worth to have ZLE attempt to
determine whether the terminal has support for this and then to make use
of that information. (Querying the terminal involves sending a control
string and then reading back a response, which is unreliable because it
can be garbled by user type-ahead or other interference.)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author