From bc66b85730a3f17f023d42945c2857d7a47dfd2c Mon Sep 17 00:00:00 2001 From: Jonas Jelten Date: Mon, 25 Nov 2019 22:46:28 +0100 Subject: add main file to allow python3 -m pgcli execution --- changelog.rst | 11 ++++++++++- pgcli/__main__.py | 9 +++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 pgcli/__main__.py diff --git a/changelog.rst b/changelog.rst index b97a72fb..79565ada 100644 --- a/changelog.rst +++ b/changelog.rst @@ -1,10 +1,19 @@ +Upcoming: +====== + +Features: +--------- + +* Add `__main__.py` file to execute pgcli as a package directly (#1123). +* Add support for ANSI escape sequences for coloring the prompt (#1122). + + 2.2.0: ====== Features: --------- -* Add support for ANSI escape sequences for coloring the prompt (#1123). * Add `\\G` as a terminator to sql statements that will show the results in expanded mode. This feature is copied from mycli. (Thanks: `Amjith Ramanujam`_) * Removed limit prompt and added automatic row limit on queries with no LIMIT clause (#1079) (Thanks: `Sebastian Janko`_) * Function argument completions now take account of table aliases (#1048). (Thanks: `Owen Stephens`_) diff --git a/pgcli/__main__.py b/pgcli/__main__.py new file mode 100644 index 00000000..ddf1662d --- /dev/null +++ b/pgcli/__main__.py @@ -0,0 +1,9 @@ +""" +pgcli package main entry point +""" + +from .main import cli + + +if __name__ == "__main__": + cli() -- cgit v1.2.3