Skip to content

Commit

Permalink
@help refactor - kamangir/bolt#746
Browse files Browse the repository at this point in the history
  • Loading branch information
kamangir committed Jan 5, 2025
1 parent 7096828 commit b08856c
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.442.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.443.1`](https://github.com/kamangir/awesome-bash-cli).
8 changes: 0 additions & 8 deletions abcli/.abcli/plugins/actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@

function abcli_perform_action() {
local options=$1

if [ $(abcli_option_int "$options" help 0) == 1 ]; then
local options="action=<action-name>,plugin=<plugin-name>"
abcli_show_usage "@perform_action $options$ABCUL<args>" \
"perform the action."
return
fi

local action_name=$(abcli_option "$options" action void)
local plugin_name=$(abcli_option "$options" plugin abcli)

Expand Down
2 changes: 1 addition & 1 deletion abcli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

DESCRIPTION = f"{ICON} a language to speak AI."

VERSION = "9.442.1"
VERSION = "9.443.1"

REPO_NAME = "awesome-bash-cli"

Expand Down
21 changes: 21 additions & 0 deletions abcli/help/actions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from typing import List

from blue_options.terminal import show_usage, xtra
from abcli.help.generic import help_functions as generic_help_functions


def help_perform_action(
tokens: List[str],
mono: bool,
) -> str:
options = "action=<action-name>,plugin=<plugin-name>"

return show_usage(
[
"@perform_action",
f"[{options}]",
"<args>",
],
"perform the action.",
mono=mono,
)
2 changes: 2 additions & 0 deletions abcli/help/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
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
from abcli.help.actions import help_perform_action
from abcli.help.plugins import help_functions as help_plugins
from abcli.help.open import help_open
from abcli.help.pause import help_pause
Expand Down Expand Up @@ -65,6 +66,7 @@
"notebooks": help_notebooks,
"open": help_open,
"pause": help_pause,
"perform_action": help_perform_action,
"plugins": help_plugins,
"repeat": help_repeat,
"sagemaker": help_sagemaker,
Expand Down

0 comments on commit b08856c

Please sign in to comment.