From 7b03f8e2043682aa2d1c06e0f7e8258b2f9c43c5 Mon Sep 17 00:00:00 2001 From: igncampa Date: Fri, 30 Nov 2018 17:21:12 -0600 Subject: allow passing -u flag (lowercase) to specify username (#975) * added -u flag --- AUTHORS | 1 + changelog.rst | 7 ++++++- pgcli/main.py | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 50779ce4..7e076e4d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -86,6 +86,7 @@ Contributors: * Kenny Do * Max Rothman * Daniel Egger + * Ignacio Campabadal Creator: -------- diff --git a/changelog.rst b/changelog.rst index e15e48e6..67256658 100644 --- a/changelog.rst +++ b/changelog.rst @@ -1,6 +1,11 @@ Upcoming: ========= +Features: +--------- + +* Allows passing the ``-u`` flag to specify a username. (Thanks: `Ignacio Campabadal`_) + Internal: --------- @@ -23,7 +28,7 @@ Internal: * Clean up and add behave logging. (Thanks: `Dick Marinus`_) * Require prompt_toolkit>=2.0.6. (Thanks: `Dick Marinus`_) -* Improve development guide (Thanks: `Ignacio Campabadal`_) +* Improve development guide. (Thanks: `Ignacio Campabadal`_) 2.0.0: ====== diff --git a/pgcli/main.py b/pgcli/main.py index c25c7617..bb80e787 100644 --- a/pgcli/main.py +++ b/pgcli/main.py @@ -942,7 +942,7 @@ class PGCli(object): @click.option('-p', '--port', default=5432, help='Port number at which the ' 'postgres instance is listening.', envvar='PGPORT', type=click.INT) @click.option('-U', '--username', 'username_opt', help='Username to connect to the postgres database.') -@click.option('--user', 'username_opt', help='Username to connect to the postgres database.') +@click.option('-u', '--user', 'username_opt', help='Username to connect to the postgres database.') @click.option('-W', '--password', 'prompt_passwd', is_flag=True, default=False, help='Force password prompt.') @click.option('-w', '--no-password', 'never_prompt', is_flag=True, -- cgit v1.2.3