From: Jonathan Nieder <jrnieder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Michael J Gruber" <git@drmicha.warpmail.net>,
git@vger.kernel.org,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: Re: [PATCH] send-email: lazily assign editor variable
Date: Fri, 26 Mar 2010 16:45:41 -0500 [thread overview]
Message-ID: <20100326214540.GA17503@progeny.tock> (raw)
In-Reply-To: <7v39zmlvz1.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
>> Yes, please. It would be more precise to
>>
>> s/without a tty/with TERM=dumb/
>>
>> in the second paragraph but regardless this is a good description of the
>> problem.
>
> Strictly speaking, with TERM=dumb the true "vi" fell back to the ex mode
> and should have been usable. A purist might say it is a bug that we fatal
> out in this case (I know that it is deliberately done to help newbies from
> common confusion by not running any editor with TERM=dumb, but to a purist
> in me it feels somewhat wrong).
With DISPLAY set, running “TERM=dumb vi | cat” with an appropriate
symlink in $PATH:
vim
Prints “Vim: Warning: Output is not to a terminal” to stderr,
waits about a second, then
runs without clearing the screen, using ANSI escapes to move around.
elvis 1.4
Prints “This termcap entry lacks the :up=: capability” to stderr,
fails with status 1.
elvis 2 (more precisely, the elvisnox script from Debian)
Prints “termcap needs up” to stderr,
fails with status 1.
nvi
Prints “ex/vi: Vi's standard input and output must be a terminal” to stderr,
fails with status 1.
With TERM=dumb but standard output going straight to the terminal, the
situation is not very different for vim and elvis, while nvi gets
utterly confused (it only writes output to the bottom line for some
reason).
So I think it still makes sense to work around this bug in the vi clones.
HTH,
Jonathan
next prev parent reply other threads:[~2010-03-26 21:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-22 14:59 [REGRESSION] git var GIT_EDITOR fails without tty Uwe Kleine-König
2010-03-22 16:12 ` [PATCH] send-email: lazily assign editor variable Michael J Gruber
2010-03-22 16:41 ` Uwe Kleine-König
2010-03-23 0:58 ` Jonathan Nieder
2010-03-23 10:56 ` Michael J Gruber
2010-03-24 17:52 ` Junio C Hamano
2010-03-25 5:17 ` Jonathan Nieder
2010-03-26 19:32 ` Junio C Hamano
2010-03-26 21:45 ` Jonathan Nieder [this message]
2010-03-25 8:03 ` Michael J Gruber
2010-03-26 19:32 ` Junio C Hamano
2010-03-22 23:25 ` [PATCH] send-email: do not check for editor until needed Jonathan Nieder
2010-03-23 9:15 ` Peter Kjellerstedt
2010-03-23 19:25 ` Jonathan Nieder
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=20100326214540.GA17503@progeny.tock \
--to=jrnieder@gmail.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=u.kleine-koenig@pengutronix.de \
/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.
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).