Make bash-wrapper work; add tests#2
Merged
codeforester merged 1 commit intomainfrom Apr 12, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces the first version of the Bash command wrapper and tightens the Bash CLI foundation around it.
The main goal is to let Bash commands inherit the shared stdlib automatically, so individual command scripts do not need boilerplate just to source
lib_std.sh. Along the way, this also adds wrapper documentation, broadens.gitignore, and expands test coverage for both the wrapper and the stdlib.What Changed
cli/bash/bin/bash-wrapperas the shared entrypoint for Bash commandsbash-wrapper <command> [args...]<command> [args...]via a symlink tobash-wrappercli/bash/commands/<name>/main.sh, with fallback support forcli/bash/commands/<name>/<name>.shBANYAN_*path and command metadata from the wrapper for downstream scriptscli/bash/lib/std/lib_std.shinside the wrapper so command scripts can use stdlib helpers without sourcing it themselveslib_std.shto honorBANYAN_BASH_BOOTSTRAP_SOURCE, so__SCRIPT_DIR__still points at the real command script even when the stdlib is sourced by the wrappercli/bash/bin/README.mddocumenting the wrapper contract, layout, and usagetest_cmdcommand/symlink pair to exercise the wrapper flow.gitignorefor macOS, editor, and common Python-generated filesTesting
cli/bash/bin/tests/bash-wrapper.batscli/bash/lib/std/tests/lib_std.batsto cover stdlib initialization and most helper functionscli/bash/tests/Validated with: