diff options
author | Stuart Quin <stuart.quin@gmail.com> | 2016-08-13 08:04:27 +0100 |
---|---|---|
committer | Stuart Quin <stuart.quin@gmail.com> | 2016-08-13 08:04:27 +0100 |
commit | a971b05ad8fb2668b9e75cdfa649493546afe86b (patch) | |
tree | 6e3c76dc0cc6c870cc4a1081baf31a16823d43e8 | |
parent | 986fd2d9921ee433436d72b3ff5e8b6c2daae34e (diff) |
Update pgspecial, avoid re-parsing watch_command
-rwxr-xr-x | pgcli/main.py | 8 | ||||
-rw-r--r-- | setup.py | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/pgcli/main.py b/pgcli/main.py index f1ef7d14..382e8678 100755 --- a/pgcli/main.py +++ b/pgcli/main.py @@ -346,7 +346,7 @@ class PGCli(object): continue return document - def execute_command(self, text): + def execute_command(self, text, query): logger = self.logger try: @@ -454,13 +454,13 @@ class PGCli(object): if watch_command: while watch_command: try: - query = self.execute_command(watch_command) - watch_command, timing = special.get_watch_command(document.text) + query = self.execute_command(watch_command, query) + click.echo('Waiting for {0} seconds before repeating'.format(timing)) sleep(timing) except KeyboardInterrupt: watch_command = None else: - query = self.execute_command(document.text) + query = self.execute_command(document.text, query) # Allow PGCompleter to learn user's preferred keywords, etc. with self._completer_lock: @@ -12,7 +12,7 @@ with open('pgcli/__init__.py', 'rb') as f: description = 'CLI for Postgres Database. With auto-completion and syntax highlighting.' install_requirements = [ - 'pgspecial>=1.5.0', + 'pgspecial>=1.6.0', 'click >= 4.1', 'Pygments >= 2.0', # Pygments has to be Capitalcased. WTF? 'prompt_toolkit>=1.0.0,<1.1.0', |