diff options
author | Stephano Paraskeva <40718272+stephanoparaskeva@users.noreply.github.com> | 2020-04-18 06:58:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 22:58:13 -0700 |
commit | 936475258d501b7b1fed1c80080eabfae8179970 (patch) | |
tree | 036fc30eb90642757182087cf40f0d718ca969ef | |
parent | f3ac5598448a0c2080ee267f00931ed556a6779d (diff) |
show_bottom_toolbar - Feature to Show/Hide Toolbar (#1170)
* adds ternary to decide whether bottom_toolbar is shown based on config value
* runs black format
* adds name to authors
* modifies changelog.rst
* removes change in changelog.rst
* formats config
* removes unused variable, adds change to changelog
* changes default back to true
* removed reference to var
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | changelog.rst | 1 | ||||
-rw-r--r-- | pgcli/main.py | 3 | ||||
-rw-r--r-- | pgcli/pgclirc | 5 |
4 files changed, 8 insertions, 2 deletions
@@ -106,6 +106,7 @@ Contributors: * George Thomas(thegeorgeous) * Yoni Nakache(lazydba247) * Gantsev Denis + * Stephano Paraskeva Creator: -------- diff --git a/changelog.rst b/changelog.rst index 62a68b41..134f5a59 100644 --- a/changelog.rst +++ b/changelog.rst @@ -8,6 +8,7 @@ Features: * Add support for ANSI escape sequences for coloring the prompt (#1122). * Add support for partitioned tables (relkind "p"). * Add support for `pg_service.conf` files +* Add config option show_bottom_toolbar. Bug fixes: diff --git a/pgcli/main.py b/pgcli/main.py index cf21bc75..91374cb1 100644 --- a/pgcli/main.py +++ b/pgcli/main.py @@ -214,6 +214,7 @@ class PGCli(object): self.decimal_format = c["data_formats"]["decimal"] self.float_format = c["data_formats"]["float"] self.initialize_keyring() + self.show_bottom_toolbar = c["main"].as_bool("show_bottom_toolbar") self.pgspecial.pset_pager( self.config["main"].as_bool("enable_pager") and "on" or "off" @@ -810,7 +811,7 @@ class PGCli(object): reserve_space_for_menu=self.min_num_menu_lines, message=get_message, prompt_continuation=get_continuation, - bottom_toolbar=get_toolbar_tokens, + bottom_toolbar=get_toolbar_tokens if self.show_bottom_toolbar else None, complete_style=complete_style, input_processors=[ # Highlight matching brackets while editing. diff --git a/pgcli/pgclirc b/pgcli/pgclirc index 220677dd..4918606c 100644 --- a/pgcli/pgclirc +++ b/pgcli/pgclirc @@ -86,6 +86,9 @@ search_path_filter = False # Timing of sql statments and table rendering. timing = True +# Show/hide the informational toolbar with function keymap at the footer. +show_bottom_toolbar = True + # Table format. Possible values: psql, plain, simple, grid, fancy_grid, pipe, # ascii, double, github, orgtbl, rst, mediawiki, html, latex, latex_booktabs, # textile, moinmoin, jira, vertical, tsv, csv. @@ -142,7 +145,7 @@ null_string = '<null>' # manage pager on startup enable_pager = True -# Use keyring to automatically save and load password in a secure manner +# Use keyring to automatically save and load password in a secure manner keyring = True # Custom colors for the completion menu, toolbar, etc. |