diff options
author | Chris Barnes <cbarnes@mrc-lmb.cam.ac.uk> | 2020-03-30 13:50:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-30 20:50:06 +0800 |
commit | d9ea18d3a0f93c7990bc5e7df76daf3e608ae3d9 (patch) | |
tree | 1091322c54889b2c5102ff25e4f22724a80f642c | |
parent | 2a28399c3f077209e5c8728fa6e7f4b13a06f990 (diff) |
Add --help output to README (#1164)
* Add --help output to README
* README: Add reference to psql env variables
-rw-r--r-- | README.rst | 40 |
1 files changed, 40 insertions, 0 deletions
@@ -53,6 +53,46 @@ Examples: $ pgcli postgres://amjith:pa$$w0rd@example.com:5432/app_db?sslmode=verify-ca&sslrootcert=/myrootcert +For more details: + +:: + + $ pgcli --help + + Usage: pgcli [OPTIONS] [DBNAME] [USERNAME] + + Options: + -h, --host TEXT Host address of the postgres database. + -p, --port INTEGER Port number at which the postgres instance is + listening. + -U, --username TEXT Username to connect to the postgres database. + -u, --user TEXT Username to connect to the postgres database. + -W, --password Force password prompt. + -w, --no-password Never prompt for password. + --single-connection Do not use a separate connection for completions. + -v, --version Version of pgcli. + -d, --dbname TEXT database name to connect to. + --pgclirc PATH Location of pgclirc file. + -D, --dsn TEXT Use DSN configured into the [alias_dsn] section of + pgclirc file. + --list-dsn list of DSN configured into the [alias_dsn] section + of pgclirc file. + --row-limit INTEGER Set threshold for row limit prompt. Use 0 to disable + prompt. + --less-chatty Skip intro on startup and goodbye on exit. + --prompt TEXT Prompt format (Default: "\u@\h:\d> "). + --prompt-dsn TEXT Prompt format for connections using DSN aliases + (Default: "\u@\h:\d> "). + -l, --list list available databases, then exit. + --auto-vertical-output Automatically switch to vertical output mode if the + result is wider than the terminal width. + --warn / --no-warn Warn before running a destructive query. + --help Show this message and exit. + +``pgcli`` also supports many of the same `environment variables`_ as ``psql`` for login options (e.g. ``PGHOST``, ``PGPORT``, ``PGUSER``, ``PGPASSWORD``, ``PGDATABASE``). + +.. _environment variables: https://www.postgresql.org/docs/current/libpq-envars.html + Features -------- |