bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-readline] Using SIGINT/rl_free_line_state () in .inputrc?


From: Tim Landscheidt
Subject: [Bug-readline] Using SIGINT/rl_free_line_state () in .inputrc?
Date: Sat, 27 Mar 2010 22:36:10 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Hi,

I'd like to set a function key in PostgreSQL's psql bindings
to execute a predefined query. At the moment, I have tried:

| $include /etc/inputrc
|
| $if psql
| "\e[24~": "\C-a\C-k\\r\n\fSELECT * FROM DashboardQuery;\n"
| $endif

(The "\\r\n" tells psql to clear its query buffer.) Unfortu-
nately, this doesn't work if readline is in "quote mode",
e. g. the preceding line contains an opening "'" or '"'. I
noticed though that pressing C-c does what I want: It can-
cels all active thingies and gives me a clean prompt.

  Unfortunately, I can't use "\C-c" to invoke it as the key
probably gets passed as SIGINT to readline. Is there another
way to "call" rl_free_line_state () from a binding defini-
tion?

TIA,
Tim





reply via email to

[Prev in Thread] Current Thread [Next in Thread]