diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-08-18 11:29:16 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-08-18 11:29:16 -0400 |
commit | 8019b5a89c3cefbaa69ab58c00281419f7e46601 (patch) | |
tree | 8a5a85f636b4dc9eb3544146083f63372ab3c62f /src | |
parent | 49917dbd76ba0b4179a82fcf033ef5a10b8e3488 (diff) | |
download | postgresql-8019b5a89c3cefbaa69ab58c00281419f7e46601.tar.gz postgresql-8019b5a89c3cefbaa69ab58c00281419f7e46601.zip |
Improve psql's tab completion for \l.
Offer a list of database names; formerly no help was offered.
Ian Barwick, reviewed by Gerdan Santos
Patch: <5724132E.1030804@2ndquadrant.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/psql/tab-complete.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index d31fd25b8d8..1345e4ed803 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3033,6 +3033,8 @@ psql_completion(const char *text, int start, int end) COMPLETE_WITH_QUERY(Query_for_list_of_encodings); else if (TailMatchesCS1("\\h") || TailMatchesCS1("\\help")) COMPLETE_WITH_LIST(sql_commands); + else if (TailMatchesCS1("\\l*") && !TailMatchesCS1("\\lo*")) + COMPLETE_WITH_QUERY(Query_for_list_of_databases); else if (TailMatchesCS1("\\password")) COMPLETE_WITH_QUERY(Query_for_list_of_roles); else if (TailMatchesCS1("\\pset")) |