Skip to content

Expand cookbook examples for robust Bash script patterns #71

@codeforester

Description

@codeforester

Summary

Add cookbook-style examples that show how to combine the public libraries into robust scripts.

Rationale

The external libraries are useful partly because they teach recurring shell patterns through examples. Base now has cleanup hooks, temp helpers, timeout-aware command execution, import guards, string mutation helpers, and version metadata; consumers need compact examples that show how these pieces fit together.

Proposed Scope

  • Add or expand examples for cleanup hooks and temp path cleanup.
  • Demonstrate std_run_with_timeout, std_command_path, and std_function_exists.
  • Demonstrate in-place string helpers and result-variable helpers.
  • Add an example for downstream version checks once the version requirement helper exists.
  • Keep examples executable where practical and wire them into validation when reasonable.
  • Update README links so consumers can discover the examples quickly.

Acceptance Criteria

  • New examples are copy-friendly but remain Base-native and tested when feasible.
  • Documentation shows recommended patterns without adding new runtime surface area unnecessarily.
  • ./tests/validate.sh passes.

Notes

Concept source: comparison with aks/bash-lib documentation breadth and luciorq/shell-lib practical script examples; write fresh Base-style docs and examples.

Metadata

Metadata

Assignees

Labels

documentationDocumentation improvements

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions