1
0
Fork 0

Merging upstream version 1.9.4.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 17:04:04 +01:00
parent 7ac9951505
commit db5ed8b1cc
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
131 changed files with 3811 additions and 826 deletions

View file

@ -266,6 +266,7 @@ PAGER_HELP = """Using pager when output is too tall for your window, default to
help="Config file for iredis, default is ~/.iredisrc.",
)
@click.option("--decode", default=None, help=DECODE_HELP)
@click.option("--client_name", help="Assign a name to the current connection.")
@click.option("--raw/--no-raw", default=None, is_flag=True, help=RAW_HELP)
@click.option("--rainbow/--no-rainbow", default=None, is_flag=True, help=RAINBOW)
@click.option("--shell/--no-shell", default=None, is_flag=True, help=SHELL)
@ -278,6 +279,7 @@ def gather_args(
p,
n,
password,
client_name,
newbie,
iredisrc,
decode,
@ -319,7 +321,8 @@ def gather_args(
if not sys.stdout.isatty():
config.raw = True
config.newbie_mode = newbie
if newbie is not None:
config.newbie_mode = newbie
if decode is not None:
config.decode = decode
@ -366,6 +369,7 @@ def create_client(params):
port = params["p"]
db = params["n"]
password = params["password"]
client_name = params["client_name"]
dsn_from_url = None
dsn = params["dsn"]
@ -385,10 +389,19 @@ def create_client(params):
path=dsn_from_url.path,
scheme=dsn_from_url.scheme,
username=dsn_from_url.username,
client_name=client_name,
)
if params["socket"]:
return Client(scheme="unix", path=params["socket"], db=db, password=password)
return Client(host=host, port=port, db=db, password=password)
return Client(
scheme="unix",
path=params["socket"],
db=db,
password=password,
client_name=client_name,
)
return Client(
host=host, port=port, db=db, password=password, client_name=client_name
)
def main():