From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Cc: Jordan Breeding <jordan.breeding@mac.com>
Subject: Re: prompt and prompt_cr option
Date: Mon, 11 Oct 2004 15:11:43 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.61.0410111456360.9416@toltec.zanshin.com> (raw)
In-Reply-To: <546D60C2-1A06-11D9-B624-000A95A6C222@mac.com>
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.)
next prev parent reply other threads:[~2004-10-11 22:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-09 15:17 Jordan Breeding
2004-10-11 22:11 ` Bart Schaefer [this message]
2004-10-11 23:28 ` Danek Duvall
2004-10-12 1:52 ` Bart Schaefer
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=Pine.LNX.4.61.0410111456360.9416@toltec.zanshin.com \
--to=schaefer@brasslantern.com \
--cc=jordan.breeding@mac.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).