Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ Contributors:
* Charbel Jacquin (charbeljc)
* Devadathan M B (devadathanmb)
* Charalampos Stratakis
* Laszlo Bimba (bimlas)

Creator:
--------
Expand Down
4 changes: 3 additions & 1 deletion pgcli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ def __init__(

self.query_history = []

self.auto_suggest = c["main"].as_bool("auto_suggest")

# Initialize completer
smart_completion = c["main"].as_bool("smart_completion")
keyword_casing = c["main"]["keyword_casing"]
Expand Down Expand Up @@ -1070,7 +1072,7 @@ def get_continuation(width, line_number, is_soft_wrap):
# Render \t as 4 spaces instead of "^I"
TabsProcessor(char1=" ", char2=" "),
],
auto_suggest=AutoSuggestFromHistory(),
auto_suggest=AutoSuggestFromHistory() if self.auto_suggest else None,
tempfile_suffix=".sql",
# N.b. pgcli's multi-line mode controls submit-on-Enter (which
# overrides the default behaviour of prompt_toolkit) and is
Expand Down
3 changes: 3 additions & 0 deletions pgcli/pgclirc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# possible completions will be listed.
smart_completion = True

# Enable auto suggestions (like Fish shell).
auto_suggest = True

# Display the completions in several columns. (More completions will be
# visible.)
wider_completion_menu = False
Expand Down