[PATCH] psql: add tab completion for \df slash command suffixes

Lists: pgsql-hackers
From: Ian Barwick <ian(dot)barwick(at)2ndquadrant(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] psql: add tab completion for \df slash command suffixes
Date: 2019-08-30 05:01:19
Message-ID: 07056421-2c99-9de8-c003-d8b800d5060c@2ndquadrant.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

Hi

I just noticed "\df[TAB]" fails to offer any tab-completion for
the possible suffixes ("\dfa", "\dfn", "\dfp", "\dft" and "\dfw").
Trivial patch attached, which applies back to Pg96, and separate
patches for Pg95 and Pg94.

I'll add this to the next commitfest.

Regards

Ian Barwick

--
Ian Barwick https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
psql-df-tab-completion.v1.patch text/x-patch 1.0 KB
psql-df-tab-completion-pg94.v1.patch text/x-patch 1.1 KB
psql-df-tab-completion-pg95.v1.patch text/x-patch 1.0 KB

From: Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>
To: Ian Barwick <ian(dot)barwick(at)2ndquadrant(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] psql: add tab completion for \df slash command suffixes
Date: 2019-09-04 06:14:23
Message-ID: CAGz5QCLxPauhWyejq9Y_z0fWJK6tjf__tHc-yYWoXSZ7c42jWg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

Hello Ian,

On Fri, Aug 30, 2019 at 10:31 AM Ian Barwick
<ian(dot)barwick(at)2ndquadrant(dot)com> wrote:
> I just noticed "\df[TAB]" fails to offer any tab-completion for
> the possible suffixes ("\dfa", "\dfn", "\dfp", "\dft" and "\dfw").
> Trivial patch attached, which applies back to Pg96, and separate
> patches for Pg95 and Pg94.
>
> I'll add this to the next commitfest.
I've reviewed the patch. It works as expected in master. But, the
syntax "\dfp" doesn't exist beyond Pg11. So, you've to remove the same
from the patches for Pg95 and Pg94. I guess the same patch should be
applied on Pg10 and Pg96.

--
Thanks & Regards,
Kuntal Ghosh
EnterpriseDB: http://www.enterprisedb.com


From: Ian Barwick <ian(dot)barwick(at)2ndquadrant(dot)com>
To: Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] psql: add tab completion for \df slash command suffixes
Date: 2019-09-04 06:19:57
Message-ID: bf93f787-c98e-19cc-009c-147d8d5165b8@2ndquadrant.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

On 2019/09/04 15:14, Kuntal Ghosh wrote:
> Hello Ian,
>
> On Fri, Aug 30, 2019 at 10:31 AM Ian Barwick
> <ian(dot)barwick(at)2ndquadrant(dot)com> wrote:
>> I just noticed "\df[TAB]" fails to offer any tab-completion for
>> the possible suffixes ("\dfa", "\dfn", "\dfp", "\dft" and "\dfw").
>> Trivial patch attached, which applies back to Pg96, and separate
>> patches for Pg95 and Pg94.
>>
>> I'll add this to the next commitfest.
> I've reviewed the patch. It works as expected in master. But, the
> syntax "\dfp" doesn't exist beyond Pg11. So, you've to remove the same
> from the patches for Pg95 and Pg94. I guess the same patch should be
> applied on Pg10 and Pg96.

Ah, good catch, I will update and resubmit.

Thanks!

Ian Barwick

--
Ian Barwick https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Ian Barwick <ian(dot)barwick(at)2ndquadrant(dot)com>
Cc: Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] psql: add tab completion for \df slash command suffixes
Date: 2019-09-27 08:26:50
Message-ID: 20190927082650.GK8485@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Sep 04, 2019 at 03:19:57PM +0900, Ian Barwick wrote:
> Ah, good catch, I will update and resubmit.

Ping. Ian, could you update and resubmit please?
--
Michael