Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

This change implements a -h/--help option for every public function in the ollama_bash_lib.sh library to display usage information.

Key changes:

  • Every function now defines a local usage variable with a short usage string.
  • Every function now accepts a -h or --help argument to show this usage information.
  • Argument parsing has been carefully implemented to be robust, following the example of ollama_app_turbo.
  • A new test script, demos/test-help.sh, has been added to verify that the help functionality works correctly for all functions.

Adds a `usage` variable and help flag handling to all public functions in `ollama_bash_lib.sh`, allowing users to get usage information by calling any function with `-h` or `--help`.

The implementation follows the pattern of the existing `ollama_app_turbo` function as requested.

- For functions with arguments, the help flag is detected anywhere in the argument list.
- For functions without arguments, only the help flag is accepted as a valid argument, with errors for any other arguments.

Also adds a new verification script, `demos/test-help.sh`, to test the new functionality across all public functions.
@attogram attogram marked this pull request as ready for review August 17, 2025 17:29
@attogram attogram merged commit 7210083 into main Aug 17, 2025
@attogram attogram deleted the feat/add-help-options branch August 17, 2025 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants