diff options
author | Amjith Ramanujam <amjith.r@gmail.com> | 2015-07-29 11:00:08 -0700 |
---|---|---|
committer | Amjith Ramanujam <amjith.r@gmail.com> | 2015-07-29 11:00:08 -0700 |
commit | 6255017b145df5cc0d09b975e4f257590666a089 (patch) | |
tree | 2d80e5d5ba3eefb0b3cca444ecd61ac0643ede97 | |
parent | 390839b945cfbeaeb4c1c07bf97fc5a99198355f (diff) | |
parent | 31c9d176e0e013a46e7d45a402a09bdc50d8db4e (diff) |
Merge pull request #305 from cagatay/customizable-history-file-location
Provide customizable history file location, Fixes #304
-rwxr-xr-x | pgcli/main.py | 3 | ||||
-rw-r--r-- | pgcli/pgclirc | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/pgcli/main.py b/pgcli/main.py index 3955b51d..29dddddd 100755 --- a/pgcli/main.py +++ b/pgcli/main.py @@ -247,8 +247,9 @@ class PGCli(object): processor=HighlightMatchingBracketProcessor(chars='[](){}'), filter=HasFocus(DEFAULT_BUFFER) & ~IsDone()), ]) + history_file = self.config['main']['history_file'] buf = PGBuffer(always_multiline=self.multi_line, completer=completer, - history=FileHistory(os.path.expanduser('~/.pgcli-history')), + history=FileHistory(os.path.expanduser(history_file)), complete_while_typing=Always()) application = Application(style=style_factory(self.syntax_style), diff --git a/pgcli/pgclirc b/pgcli/pgclirc index af84c0d9..080fc57b 100644 --- a/pgcli/pgclirc +++ b/pgcli/pgclirc @@ -14,6 +14,9 @@ multi_line = False # log_file location. log_file = ~/.pgcli.log +# history_file location. +history_file = ~/.pgcli-history + # Default log level. Possible values: "CRITICAL", "ERROR", "WARNING", "INFO" # and "DEBUG". log_level = INFO |