Re: Question about Ctrl-C and less

From: "Sean Utt" <sean(at)strateja(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Question about Ctrl-C and less
Date: 2005-10-22 00:37:54
Message-ID: 018501c5d6a0$d761f600$0101a8c0@office.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


If you send a recent version of vim a CONTROL-C, and you're just sitting
there at a prompt, it gives you a hint:

Type :quit<Enter> to exit Vim

Any reason not to just trap the CONTROL-C in psql when paging and offer a
hint? Especially since we don't really know that the user really wanted to
type CONTROL-C instead of q for quit. I know that I have always meant to
type q and was just distracted whenever I've typed CONTROL-C in the pager,
and so passing the CONTROL-C on to less is not actually "heeding my wishes",
it is instead giving me enough rope to shoot myself in the foot.

Sean

(and mixed metaphors really make by hair boil)

[big snippage]

> Not at all. When you send SIGINT to a process, you want that process
> to stop doing whatever it's doing and return control to you. That's
> what it means, and that's what it's for. If we ignore SIGINT then
> obviously we will *not* be heeding the wishes of the user who sends
> SIGINT, and that is not likely what the user expects.
>
>
> --
> Kevin Brown kevin(at)sysexperts(dot)com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sean Utt 2005-10-22 00:42:56 Re: Question about Ctrl-C and less
Previous Message Kevin Brown 2005-10-22 00:28:49 Re: Question about Ctrl-C and less