tab complete for psql pset pager values

Started by Pavel Stehuleover 8 years ago3 messages
#1Pavel Stehule
pavel.stehule@gmail.com
1 attachment(s)

Hi

attached trivial patch for missing tab complete for \pset pager setting

Regards

Pavel

Attachments:

psql-pset-pager-tabcomplete.patchtext/x-patch; charset=US-ASCII; name=psql-pset-pager-tabcomplete.patchDownload
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index e9fdc908c7..1b15c5b0d1 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -3536,6 +3536,8 @@ psql_completion(const char *text, int start, int end)
 								"unicode_column_linestyle|"
 								"unicode_header_linestyle"))
 			COMPLETE_WITH_LIST_CS2("single", "double");
+		else if (TailMatchesCS1("pager"))
+			COMPLETE_WITH_LIST_CS3("on", "off", "always");
 	}
 	else if (TailMatchesCS1("\\unset"))
 		matches = complete_from_variables(text, "", "", true);
#2Jeff Janes
jeff.janes@gmail.com
In reply to: Pavel Stehule (#1)
Re: tab complete for psql pset pager values

On Wed, Jul 26, 2017 at 8:02 AM, Pavel Stehule <pavel.stehule@gmail.com>
wrote:

Hi

attached trivial patch for missing tab complete for \pset pager setting

Looks good to me. I've set it ready for committer.

Cheers,

Jeff

#3Peter Eisentraut
peter.eisentraut@2ndquadrant.com
In reply to: Pavel Stehule (#1)
Re: tab complete for psql pset pager values

On 7/26/17 11:02, Pavel Stehule wrote:

attached trivial patch for missing tab complete for \pset pager setting

committed (back to 9.6)

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers