From abe496b968e71fe0985ba3465907e414e92fa67a Mon Sep 17 00:00:00 2001 From: kamangir Date: Sun, 24 Nov 2024 21:09:56 -0800 Subject: [PATCH] @help @ls - kamangir/bolt#746 --- README.md | 2 +- abcli/.abcli/tests/help.sh | 2 ++ abcli/__init__.py | 2 +- abcli/help/functions.py | 2 ++ abcli/help/ls.py | 30 ++++++++++++++++++++++++++++++ 5 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 abcli/help/ls.py diff --git a/README.md b/README.md index 594289c4..c6732cc1 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.167.1`](https://github.com/kamangir/awesome-bash-cli), based on 🪄 [`abcli-9.430.1`](https://github.com/kamangir/awesome-bash-cli). +built by 🌀 [`blue_options-4.169.1`](https://github.com/kamangir/awesome-bash-cli), based on 🪄 [`abcli-9.431.1`](https://github.com/kamangir/awesome-bash-cli). diff --git a/abcli/.abcli/tests/help.sh b/abcli/.abcli/tests/help.sh index 65bf7d51..332b7fda 100644 --- a/abcli/.abcli/tests/help.sh +++ b/abcli/.abcli/tests/help.sh @@ -66,6 +66,8 @@ function test_abcli_help() { "@latex build" \ "@latex install" \ \ + "@ls" \ + \ "@pause" \ \ "@plugins get_module_name" \ diff --git a/abcli/__init__.py b/abcli/__init__.py index 16e2de4b..7b951c8f 100644 --- a/abcli/__init__.py +++ b/abcli/__init__.py @@ -6,7 +6,7 @@ DESCRIPTION = f"{ICON} a language to speak AI." -VERSION = "9.430.1" +VERSION = "9.431.1" REPO_NAME = "awesome-bash-cli" diff --git a/abcli/help/functions.py b/abcli/help/functions.py index f8c985ff..9149a9db 100644 --- a/abcli/help/functions.py +++ b/abcli/help/functions.py @@ -14,6 +14,7 @@ from abcli.help.latex import help_functions as help_latex from abcli.help.logging import help_cat, help_log_list from abcli.help.logging import help_functions as help_log +from abcli.help.ls import help_ls from abcli.help.metadata import help_functions as help_metadata from abcli.help.mlflow import help_functions as help_mlflow from abcli.help.notebooks import help_functions as help_notebooks @@ -53,6 +54,7 @@ "init": help_init, "latex": help_latex, "log": help_log, + "ls": help_ls, "metadata": help_metadata, "mlflow": help_mlflow, "notebooks": help_notebooks, diff --git a/abcli/help/ls.py b/abcli/help/ls.py new file mode 100644 index 00000000..b950ade0 --- /dev/null +++ b/abcli/help/ls.py @@ -0,0 +1,30 @@ +from typing import List + +from blue_options.terminal import show_usage + + +def help_ls( + tokens: List[str], + mono: bool, +) -> str: + return "\n".join( + [ + show_usage( + [ + "@ls", + "cloud | local", + "", + ], + "ls ", + mono=mono, + ), + show_usage( + [ + "@ls", + "", + ], + "ls .", + mono=mono, + ), + ] + )