summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-04 07:19:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-04 07:20:07 +0000
commitdd874ab02db04853d4b5952712ab34693f9a93de (patch)
tree4b4e05d004da14862aa1680cf761476fa2b4a05c /README.md
parentReleasing debian version 1.12.1-1. (diff)
downloadiredis-dd874ab02db04853d4b5952712ab34693f9a93de.tar.xz
iredis-dd874ab02db04853d4b5952712ab34693f9a93de.zip
Merging upstream version 1.13.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'README.md')
-rw-r--r--README.md96
1 files changed, 62 insertions, 34 deletions
diff --git a/README.md b/README.md
index ae2f3a1..11f3cb2 100644
--- a/README.md
+++ b/README.md
@@ -126,7 +126,7 @@ supports similar options like redis-cli, like `-h` for redis-server's host and
```
$ iredis --help
-Usage: [OPTIONS] [CMD]...
+Usage: iredis [OPTIONS] [CMD]...
IRedis: Interactive Redis
@@ -143,39 +143,60 @@ Usage: [OPTIONS] [CMD]...
settings.
Options:
- -h TEXT Server hostname (default: 127.0.0.1).
- -p TEXT Server port (default: 6379).
- -s, --socket TEXT Server socket (overrides hostname and port).
- -n TEXT Database number.(overwrites dsn/url's db number)
- -a, --password TEXT Password to use when connecting to the server.
- --url TEXT Use Redis URL to indicate connection(Can set with
- env `IREDIS_URL`), Example:
- redis://[[username]:[password]]@localhost:6379/0
- rediss://[[username]:[password]]@localhost:6379/0
- unix://[[username]:[password]]@/path/to/socket.soc
- k?db=0
-
- -d, --dsn TEXT Use DSN configured into the [alias_dsn] section of
- iredisrc file. (Can set with env `IREDIS_DSN`)
-
- --newbie / --no-newbie Show command hints and useful helps.
- --iredisrc TEXT Config file for iredis, default is ~/.iredisrc.
- --decode TEXT decode response, default is No decode, which will
- output all bytes literals.
-
- --client_name TEXT Assign a name to the current connection.
- --raw / --no-raw Use raw formatting for replies (default when
- STDOUT is not a tty). However, you can use --no-
- raw to force formatted output even when STDOUT is
- not a tty.
-
- --rainbow / --no-rainbow Display colorful prompt.
- --shell / --no-shell Allow to run shell commands, default to True.
- --pager / --no-pager Using pager when output is too tall for your
- window, default to True.
-
- --version Show the version and exit.
- --help Show this message and exit.
+ -h TEXT Server hostname (default: 127.0.0.1).
+ -p TEXT Server port (default: 6379).
+ -s, --socket TEXT Server socket (overrides hostname and port).
+ -n INTEGER Database number.(overwrites dsn/url's db
+ number)
+
+ -u, --username TEXT User name used to auth, will be ignore for
+ redis version < 6.
+
+ -a, --password TEXT Password to use when connecting to the
+ server.
+
+ --url TEXT Use Redis URL to indicate connection(Can set
+ with env `IREDIS_URL`), Example: redis:/
+ /[[username]:[password]]@localhost:6379/0
+ rediss://[[username]:[password]]@localhost:6
+ 379/0 unix://[[username]:[password]]@/pa
+ th/to/socket.sock?db=0
+
+ -d, --dsn TEXT Use DSN configured into the [alias_dsn]
+ section of iredisrc file. (Can set with env
+ `IREDIS_DSN`)
+
+ --newbie / --no-newbie Show command hints and useful helps.
+ --iredisrc TEXT Config file for iredis, default is
+ ~/.iredisrc.
+
+ --decode TEXT decode response, default is No decode, which
+ will output all bytes literals.
+
+ --client_name TEXT Assign a name to the current connection.
+ --raw / --no-raw Use raw formatting for replies (default when
+ STDOUT is not a tty). However, you can use
+ --no-raw to force formatted output even when
+ STDOUT is not a tty.
+
+ --rainbow / --no-rainbow Display colorful prompt.
+ --shell / --no-shell Allow to run shell commands, default to
+ True.
+
+ --pager / --no-pager Using pager when output is too tall for your
+ window, default to True.
+
+ --verify-ssl [none|optional|required]
+ Set the TLS certificate verification
+ strategy
+
+ --prompt TEXT Prompt format (supported interpolations:
+ {client_name}, {db}, {host}, {path}, {port},
+ {username}, {client_addr}, {client_id}).
+
+ --version Show the version and exit.
+ --help Show this message and exit.
+
```
### Using DSN
@@ -215,6 +236,13 @@ interpolations:
- `{client_addr}`
- `{client_id}`
+The `--prompt` utilize
+[Python String format engine](https://docs.python.org/3/library/string.html#formatstrings),
+so as long as it is a valid string formatter, it will work( anything that
+`"<your prompt>".format(...)` accepts). For example, you can limit your Redis
+server host name's length to 5 by setting `--prompt` to
+`iredis --prompt '{host:.5s}'`.
+
### Configuration
IRedis supports config files. Command-line options will always take precedence