From 69829819561dd586ad38aeb10ed71ca0771b9d7a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Aug 2022 14:04:47 +0200 Subject: Merging upstream version 1.12.1. Signed-off-by: Daniel Baumann --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index e7daf42..ae2f3a1 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,8 @@ like `KEYS *` (see - Written in pure Python, but IRedis was packaged into a single binary with [PyOxidizer](https://github.com/indygreg/PyOxidizer), you can use cURL to download and run, it just works, even you don't have a Python interpreter. +- You can change the cli prompt using `--prompt` option or set via `~/.iredisrc` + config file. - Hide password for `AUTH` command. - Says "Goodbye!" to you when you exit! - For full features, please see: [iredis.io](https://www.iredis.io) @@ -190,6 +192,29 @@ staging=redis://username:password@staging-redis.example.com:6379/1 Put this in your `iredisrc` then connect via `iredis -d staging` or `iredis -d dev`. +### Change The Default Prompt + +You can change the prompt str, the default prompt is: + +```shell +127.0.0.1:6379> +``` + +Which is rendered by `{host}:{port}[{db}]> `, you can change this via `--prompt` +option or change +[iredisrc](https://github.com/laixintao/iredis/blob/master/iredis/data/iredisrc) +config file. The prompwt string uses python string format engine, supported +interpolations: + +- `{client_name}` +- `{db}` +- `{host}` +- `{path}` +- `{port}` +- `{username}` +- `{client_addr}` +- `{client_id}` + ### Configuration IRedis supports config files. Command-line options will always take precedence -- cgit v1.2.3