From a0e9b9e37e8004ebb1cebe82abb6a1c208c7c385 Mon Sep 17 00:00:00 2001 From: kamangir Date: Sun, 5 Jan 2025 12:07:03 -0800 Subject: [PATCH] =?UTF-8?q?start=20of=20help-refactors-2025-01-05-1ySw0l?= =?UTF-8?q?=20=F0=9F=AA=84=20-=20kamangir/bolt#746?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- abcli/.abcli/tests/help.sh | 2 ++ abcli/__init__.py | 2 +- abcli/help/functions.py | 2 ++ abcli/help/select.py | 20 ++++++++++++++++++++ 5 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 abcli/help/select.py diff --git a/README.md b/README.md index 370b4890..4e481ffc 100644 --- a/README.md +++ b/README.md @@ -63,4 +63,4 @@ create a copy of [`sample.env`](./abcli/sample.env) as `.env` and fill in the se [![pylint](https://github.com/kamangir/awesome-bash-cli/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/awesome-bash-cli/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/awesome-bash-cli/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/awesome-bash-cli/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/awesome-bash-cli/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/awesome-bash-cli/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/abcli.svg)](https://pypi.org/project/abcli/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/abcli)](https://pypistats.org/packages/abcli) -built by 🌀 [`blue_options-4.174.1`](https://github.com/kamangir/awesome-bash-cli), based on 🪄 [`abcli-9.440.1`](https://github.com/kamangir/awesome-bash-cli). +built by 🌀 [`blue_options-4.174.1`](https://github.com/kamangir/awesome-bash-cli), based on 🪄 [`abcli-9.441.1`](https://github.com/kamangir/awesome-bash-cli). diff --git a/abcli/.abcli/tests/help.sh b/abcli/.abcli/tests/help.sh index 5976c292..1a6b8f3e 100644 --- a/abcli/.abcli/tests/help.sh +++ b/abcli/.abcli/tests/help.sh @@ -105,6 +105,8 @@ function test_abcli_help() { "@seed eject" \ "@seed list" \ \ + "@select" \ + \ "@sleep" \ \ "@test" \ diff --git a/abcli/__init__.py b/abcli/__init__.py index 7afb7db1..ca78c552 100644 --- a/abcli/__init__.py +++ b/abcli/__init__.py @@ -6,7 +6,7 @@ DESCRIPTION = f"{ICON} a language to speak AI." -VERSION = "9.440.1" +VERSION = "9.441.1" REPO_NAME = "awesome-bash-cli" diff --git a/abcli/help/functions.py b/abcli/help/functions.py index 84ce3f33..b4b27c0f 100644 --- a/abcli/help/functions.py +++ b/abcli/help/functions.py @@ -25,6 +25,7 @@ from abcli.help.repeat import help_repeat from abcli.help.sagemaker import help_functions as help_sagemaker from abcli.help.seed import help_functions as help_seed +from abcli.help.select import help_select from abcli.help.sleep import help_sleep from abcli.help.source import ( help_source_caller_suffix_path, @@ -66,6 +67,7 @@ "repeat": help_repeat, "sagemaker": help_sagemaker, "seed": help_seed, + "select": help_select, "sleep": help_sleep, "source_caller_suffix_path": help_source_caller_suffix_path, "source_path": help_source_path, diff --git a/abcli/help/select.py b/abcli/help/select.py new file mode 100644 index 00000000..ebc0df78 --- /dev/null +++ b/abcli/help/select.py @@ -0,0 +1,20 @@ +from typing import List + +from blue_options.terminal import show_usage, xtra + + +def help_select( + tokens: List[str], + mono: bool, +) -> str: + options = xtra("open,type=,~trail", mono=mono) + + return show_usage( + [ + "@select", + "[-|]", + f"[{options}]", + ], + "select .", + mono=mono, + )