RE: Psql meta-command conninfo+
От | Maiquel Grassi |
---|---|
Тема | RE: Psql meta-command conninfo+ |
Дата | |
Msg-id | CP8P284MB2496BA609AD64698B5550A58EC4B2@CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM обсуждение исходный текст |
Ответ на | Re: Psql meta-command conninfo+ (Jim Jones <jim.jones@uni-muenster.de>) |
Ответы |
Re: Psql meta-command conninfo+
|
Список | pgsql-hackers |
On 08.02.24 21:37, Erik Wienhold wrote:
>> Modifiers such as + or S in \dS are not covered by autocompletion.
>> src/bin/psql/tab-complete.c only specifies backslash commands in their
>> basic form (without modifiers).
>>
>> (\dS<TAB> actually autocompletes to \ds to my surprise)
>>
>Aha... I never noticed it. Well, with most commands having 1 - 3
>characters it is not a surprised I never used it :)
>That "\dS<TAB>" autocompletes to "\ds " surprises me even more.
>Thanks for pointing out!
--//--
Good evening, dear all!
Here is the mechanism that implements this:
.
.
.
1673 /* Match the last N words before point, case-sensitively. */
1676 VA_ARGS_NARGS(__VA_ARGS__), __VA_ARGS__)
.
.
.
4824 else if (TailMatchesCS("\\ds*"))
4825 COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_sequences);
.
.
.
There is a rather large list of meta-commands that are handled by TailMatchesCS(...).
For example:
\ENCODING<TAB> autocompletes to \encoding
\eNcOdInG<TAB> autocompletes to \encoding
\dU<TAB> or \DU<TAB> autocompletes to \du
Including the command under discussion:
\CONNINFO<TAB> autocompletes to \conninfo
For the meta-commands[+], there is no autocomplete.
Regards,
Maiquel Grassi.
В списке pgsql-hackers по дате отправления: