summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmjith Ramanujam <amjith.r@gmail.com>2020-01-07 06:55:36 -0800
committerGitHub <noreply@github.com>2020-01-07 06:55:36 -0800
commit2b55da84812f94bc98d3586244f02749326062d5 (patch)
tree53e41db2f7cbe1df5e5dda8ac6004711a5a5e1f7
parenta5f7d9196c45519aef761692698875ce9d8d4f8c (diff)
parentc74bfe37aca8e02027c2b74b8327b6b7e76ada77 (diff)
Merge pull request #1123 from TheJJ/main-file
add main file to allow python3 -m pgcli execution
-rw-r--r--changelog.rst7
-rw-r--r--pgcli/__main__.py9
2 files changed, 15 insertions, 1 deletions
diff --git a/changelog.rst b/changelog.rst
index 906aac36..1b12b15f 100644
--- a/changelog.rst
+++ b/changelog.rst
@@ -1,6 +1,12 @@
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).
+
Internal:
---------
@@ -12,7 +18,6 @@ Internal:
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()