Skip to content

Commit f117555

Browse files
committed
Add some missing backslash commands to psql's tab-completion knowledge.
\if and related commands were overlooked here, as were \dRp and \dRs from the logical-replication patch, as was \?. While here, reformat the list to put each new first command letter on a separate line; perhaps that will limit the need to reflow the whole list when we add more commands in future. Masahiko Sawada (reformatting by me) Discussion: https://postgr.es/m/CAD21AoDW1QHtBsM33hV+Fg2mYEs+FWj4qtoCU72AwHAXQ3U6ZQ@mail.gmail.com
1 parent 512c735 commit f117555

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

src/bin/psql/tab-complete.c

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,19 +1421,33 @@ psql_completion(const char *text, int start, int end)
14211421

14221422
/* psql's backslash commands. */
14231423
static const char *const backslash_commands[] = {
1424-
"\\a", "\\connect", "\\conninfo", "\\C", "\\cd", "\\copy",
1424+
"\\a",
1425+
"\\connect", "\\conninfo", "\\C", "\\cd", "\\copy",
14251426
"\\copyright", "\\crosstabview",
14261427
"\\d", "\\da", "\\dA", "\\db", "\\dc", "\\dC", "\\dd", "\\ddp", "\\dD",
14271428
"\\des", "\\det", "\\deu", "\\dew", "\\dE", "\\df",
14281429
"\\dF", "\\dFd", "\\dFp", "\\dFt", "\\dg", "\\di", "\\dl", "\\dL",
1429-
"\\dm", "\\dn", "\\do", "\\dO", "\\dp", "\\drds", "\\ds", "\\dS",
1430+
"\\dm", "\\dn", "\\do", "\\dO", "\\dp",
1431+
"\\drds", "\\dRs", "\\dRp", "\\ds", "\\dS",
14301432
"\\dt", "\\dT", "\\dv", "\\du", "\\dx", "\\dy",
1431-
"\\e", "\\echo", "\\ef", "\\encoding", "\\errverbose", "\\ev",
1432-
"\\f", "\\g", "\\gexec", "\\gset", "\\gx", "\\h", "\\help", "\\H",
1433-
"\\i", "\\ir", "\\l", "\\lo_import", "\\lo_export", "\\lo_list",
1434-
"\\lo_unlink", "\\o", "\\p", "\\password", "\\prompt", "\\pset", "\\q",
1435-
"\\qecho", "\\r", "\\s", "\\set", "\\setenv", "\\sf", "\\sv", "\\t",
1436-
"\\T", "\\timing", "\\unset", "\\x", "\\w", "\\watch", "\\z", "\\!",
1433+
"\\e", "\\echo", "\\ef", "\\elif", "\\else", "\\encoding",
1434+
"\\endif", "\\errverbose", "\\ev",
1435+
"\\f",
1436+
"\\g", "\\gexec", "\\gset", "\\gx",
1437+
"\\h", "\\help", "\\H",
1438+
"\\i", "\\if", "\\ir",
1439+
"\\l", "\\lo_import", "\\lo_export", "\\lo_list", "\\lo_unlink",
1440+
"\\o",
1441+
"\\p", "\\password", "\\prompt", "\\pset",
1442+
"\\q", "\\qecho",
1443+
"\\r",
1444+
"\\s", "\\set", "\\setenv", "\\sf", "\\sv",
1445+
"\\t", "\\T", "\\timing",
1446+
"\\unset",
1447+
"\\x",
1448+
"\\w", "\\watch",
1449+
"\\z",
1450+
"\\!", "\\?",
14371451
NULL
14381452
};
14391453

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy