Re: Tab completion for \gx

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Vik Fearing <vik(at)postgresfriends(dot)org>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Tab completion for \gx
Date: 2020-04-01 03:01:44
Message-ID: 20200401030144.GM17676@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Patch applied though PG 10, thanks.

---------------------------------------------------------------------------

On Thu, Mar 26, 2020 at 09:58:50AM -0700, Vik Fearing wrote:
> While reviewing the patch for \gf, I noticed that \gx does not have tab
> completion for its optional filename. Trivial patch attached. I would
> also suggest this be backpatched.
> --
> Vik Fearing

> diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
> index ae35fa4aa9..7252b6c4e6 100644
> --- a/src/bin/psql/tab-complete.c
> +++ b/src/bin/psql/tab-complete.c
> @@ -3882,7 +3882,7 @@ psql_completion(const char *text, int start, int end)
> COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_routines, NULL);
> else if (TailMatchesCS("\\sv*"))
> COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_views, NULL);
> - else if (TailMatchesCS("\\cd|\\e|\\edit|\\g|\\i|\\include|"
> + else if (TailMatchesCS("\\cd|\\e|\\edit|\\g|\\gx|\\i|\\include|"
> "\\ir|\\include_relative|\\o|\\out|"
> "\\s|\\w|\\write|\\lo_import"))
> {

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message James Coleman 2020-04-01 03:07:13 Re: [PATCH] Incremental sort (was: PoC: Partial sort)
Previous Message Masahiko Sawada 2020-04-01 02:56:20 Re: pg_stat_statements issue with parallel maintenance (Was Re: WAL usage calculation patch)