From 305af813b8b535b7fa617300407a640387f4b17a Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Mon, 23 Mar 2026 23:30:29 +0000 Subject: [PATCH] implement Connection flag parsing add Shell Completion section to README patch bump --- README.md | 11 +++++++++++ src/q3rcon_cli/__about__.py | 2 +- src/q3rcon_cli/cli.py | 4 ++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c130819..bb6c14a 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,9 @@ ## Table of Contents - [Installation](#installation) +- [Configuration](#configuration) +- [Use](#use) +- [Shell Completion](#shell-completion) - [License](#license) ## Installation @@ -83,6 +86,14 @@ Usage: q3rcon-cli [OPTIONS] COMMAND ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ``` +## Shell Completion + +Shell completion scripts are available for *bash*, *zsh*, and *fish*. + +```console +q3rcon-cli --install-autocomplete +``` + ## Special Thanks - [lapetus-11](https://github.com/Iapetus-11) for writing the [aio-q3-rcon](https://github.com/Iapetus-11/aio-q3-rcon) package. diff --git a/src/q3rcon_cli/__about__.py b/src/q3rcon_cli/__about__.py index eabe6b4..2ad2b34 100644 --- a/src/q3rcon_cli/__about__.py +++ b/src/q3rcon_cli/__about__.py @@ -1,4 +1,4 @@ # SPDX-FileCopyrightText: 2026-present onyx-and-iris # # SPDX-License-Identifier: MIT -__version__ = '0.3.2' +__version__ = '0.3.3' diff --git a/src/q3rcon_cli/cli.py b/src/q3rcon_cli/cli.py index 6185b86..2bb5d92 100644 --- a/src/q3rcon_cli/cli.py +++ b/src/q3rcon_cli/cli.py @@ -1,6 +1,7 @@ import clypi from aioq3rcon import Client, IncorrectPasswordError from clypi import Command, Spinner, arg +from clypi import parsers as cp from typing_extensions import override from . import console @@ -38,6 +39,7 @@ class Q3rconCli(Command): help='The host to connect to', env='Q3RCON_CLI_HOST', group='Connection', + parser=cp.Str(min=1), ) port: int = arg( 28960, @@ -45,6 +47,7 @@ class Q3rconCli(Command): help='The port to connect to', env='Q3RCON_CLI_PORT', group='Connection', + parser=cp.Int(min=1, max=65535), ) password: str = arg( '', @@ -52,6 +55,7 @@ class Q3rconCli(Command): help='The password for authentication', env='Q3RCON_CLI_PASSWORD', group='Connection', + parser=cp.Str(min=8), ) interactive: bool = arg( False,