Problem
The stdlib initializer and standalone launcher scan every argument for wrapper flags. They do not stop at the conventional -- delimiter.
At main commit a107134, sourcing the stdlib with alpha -- --color omega leaves alpha -- omega; the target script can never receive a literal --color after the delimiter. base_bash_filter_runtime_args duplicates the same behavior. It also publishes its temporary result through an undeclared global base_bash_runtime_args.
Separately, base-bash --help prints normal help but exits with status 2, the same as missing required input.
Scope
- Stop wrapper-option interpretation after the first standalone
-- and preserve the entire remaining argument tail.
- Keep recognized wrapper flags before the delimiter working as today.
- Ensure top-level target-script arguments and
main arguments are identical.
- Keep launcher filtering state local or caller-owned instead of leaking a generic global.
- Return
0 for explicit help and a usage status for a missing script.
Acceptance Criteria
base-bash script -- --color delivers -- --color to both the sourced script body and main.
- Wrapper flags before
-- are consumed exactly once and still configure logging.
- The launcher exposes no filtering scratch global to the target script.
base-bash --help returns 0; invoking without a script remains a usage failure.
Validation
bats tests/launcher.bats lib/bash/std/tests/lib_std.bats
./tests/validate.sh
git diff --check
Problem
The stdlib initializer and standalone launcher scan every argument for wrapper flags. They do not stop at the conventional
--delimiter.At
maincommita107134, sourcing the stdlib withalpha -- --color omegaleavesalpha -- omega; the target script can never receive a literal--colorafter the delimiter.base_bash_filter_runtime_argsduplicates the same behavior. It also publishes its temporary result through an undeclared globalbase_bash_runtime_args.Separately,
base-bash --helpprints normal help but exits with status2, the same as missing required input.Scope
--and preserve the entire remaining argument tail.mainarguments are identical.0for explicit help and a usage status for a missing script.Acceptance Criteria
base-bash script -- --colordelivers-- --colorto both the sourced script body andmain.--are consumed exactly once and still configure logging.base-bash --helpreturns0; invoking without a script remains a usage failure.Validation
bats tests/launcher.bats lib/bash/std/tests/lib_std.bats./tests/validate.shgit diff --check