From: | Kirk Wolak <wolakk(at)gmail(dot)com> |
---|---|
To: | Kevin Wang <kevinpgcloud(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: A tiny improvement of psql |
Date: | 2023-12-27 07:00:04 |
Message-ID: | CACLU5mQvWw5wahqF-rTDHM4_dCBQeqQ2_6=aLkcaAVpj_ycecQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Dec 26, 2023 at 11:26 AM Kevin Wang <kevinpgcloud(at)gmail(dot)com> wrote:
> Hello hackers!
>
> I am an Oracle/PostgreSQL DBA, I am not a PG hacker. During my daily job,
> I find a pain that should be fixed.
>
> As you know, we can use the UP arrow key to get the previous command to
> avoid extra typing. This is a wonderful feature to save the lives of every
> DBA. However, if I type the commands like this sequence: A, B, B, B, B, B,
> B, as you can see, B is the last command I execute.
>
> But if I try to get command A, I have to press the UP key 7 times. I
> think the best way is: when you press the UP key, plsql should show the
> command that is different from the previous command, so the recall sequence
> should be B -> A, not B -> B -> ... -> A. Then I only press the UP key 2
> times to get command A.
>
> I think this should change little code in psql, but it will make all DBA's
> lives much easier. This is a strong requirement from the real DBA. Hope to
> get some feedback on this.
>
> Kevin,
with readline, I use ctrl-r (incremental search backwards).
but if you are willing to modify your .inputrc you can enable the "windows
cmd F5/F8 keys... Search Fwd/Bwd".
where you type B<F8>
inputrc:
# Map F8 (back) F5(forward) search like CMD
"\e[19~": history-search-backward
"\e[15~": history-search-forward
There are commented out lines tying them to Page Up/Page Down... But 30
yrs in a CMD prompt...
The upside is that this works in bash and other programs as well...
HTH
Kirk Out!
>
From | Date | Subject | |
---|---|---|---|
Next Message | Nisha Moond | 2023-12-27 07:35:23 | Re: Intermittent failure with t/003_logical_slots.pl test on windows |
Previous Message | Deepak M | 2023-12-27 06:35:31 | Re: A tiny improvement of psql |