From: Junio C Hamano <gitster@pobox.com>
To: Sean Estabrooks <seanlkml@sympatico.ca>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Reset terminal attributes when terminating git send-email
Date: Fri, 17 Aug 2007 15:19:15 -0700 [thread overview]
Message-ID: <7vr6m1g5y4.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <11873867051589-git-send-email-seanlkml@sympatico.ca> (Sean Estabrooks's message of "Fri, 17 Aug 2007 17:38:25 -0400")
Sean Estabrooks <seanlkml@sympatico.ca> writes:
> If you break out of the prompts presented to you by git send-email
> your terminal can be left in an inconsistent state. Here we trap
> the interrupt signal and reset the terminal before exiting.
>
> Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
> ---
> git-send-email.perl | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 69559b2..f1a8855 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -21,8 +21,11 @@ use warnings;
> use Term::ReadLine;
> use Getopt::Long;
> use Data::Dumper;
> +use Term::ANSIColor;
> use Git;
>
> +$SIG{INT} = sub { print color("reset"), "\n"; exit };
> +
> package FakeTerm;
> sub new {
> my ($class, $reason) = @_;
I wonder if this is something Term::ReadLine when not using
FakeTerm should and does provide... Is this the standard
workaround all the applications that use Term::ReadLine need to
implement themselves?
next prev parent reply other threads:[~2007-08-17 22:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-17 21:38 [PATCH] Fix small typo in git send-email man page Sean Estabrooks
2007-08-17 21:38 ` [PATCH] Reset terminal attributes when terminating git send-email Sean Estabrooks
2007-08-17 22:19 ` Junio C Hamano [this message]
2007-08-17 22:35 ` Sean
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=7vr6m1g5y4.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=seanlkml@sympatico.ca \
/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).