1
0
Fork 0

Merging upstream version 1.13.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 17:11:21 +01:00
parent 42793cd525
commit 3df609c05e
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
358 changed files with 22553 additions and 11848 deletions

View file

@ -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
-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)
-d, --dsn TEXT Use DSN configured into the [alias_dsn] section of
iredisrc file. (Can set with env `IREDIS_DSN`)
-u, --username TEXT User name used to auth, will be ignore for
redis version < 6.
--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.
-a, --password TEXT Password to use when connecting to the
server.
--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.
--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
--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.
-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.
--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