Severity: Low
Expected real-world likelihood: Low
Problem
The three generated forms are marked executable by the Makefile, but they only define the bj function. Executing them with JSON/query arguments produces no query output and normally exits with status 0.
The README specifically shows only bj.sh in the external-script example and describes the wrapped forms as suitable for sourcing or copying, so source-only behavior may be intentional. The executable bits and general semantic-equivalence expectation nevertheless make the supported interface ambiguous.
Reproduction
./bj.sh '{"a":1}' a
printf 'bj.sh status=%s\n' "$?"
./bj-1line.sh '{"a":1}' a
printf 'bj-1line status=%s\n' "$?"
./bj-80-col.sh '{"a":1}' a
printf 'bj-80-col status=%s\n' "$?"
Actual:
bj.sh prints 1 and exits 0;
- generated forms print nothing and exit 0 when launched from Bash.
The Makefile applies chmod +x to every generated target.
Possible fixes (suggestions only)
These are possible approaches, not prescribed implementations:
- Explicitly document that generated forms are source/copy-only libraries and that direct execution is supported only by
bj.sh.
- Stop marking source-only generated forms executable.
- If CLI equivalence is intended, retain or add a compact invocation footer in generated forms.
Any choice should preserve bj-1line.sh as the canonical compact representation and keep the documented source/copy use case straightforward.
Suggested coverage
Once the intended contract is chosen:
- assert the supported direct-execution behavior;
- assert sourcing behavior for every generated form;
- ensure output and exit status expectations are explicit.
Severity: Low
Expected real-world likelihood: Low
Problem
The three generated forms are marked executable by the Makefile, but they only define the
bjfunction. Executing them with JSON/query arguments produces no query output and normally exits with status 0.The README specifically shows only
bj.shin the external-script example and describes the wrapped forms as suitable for sourcing or copying, so source-only behavior may be intentional. The executable bits and general semantic-equivalence expectation nevertheless make the supported interface ambiguous.Reproduction
Actual:
bj.shprints1and exits 0;The Makefile applies
chmod +xto every generated target.Possible fixes (suggestions only)
These are possible approaches, not prescribed implementations:
bj.sh.Any choice should preserve
bj-1line.shas the canonical compact representation and keep the documented source/copy use case straightforward.Suggested coverage
Once the intended contract is chosen: