Skip to content

Support callers with nounset enabled - #37

Merged
memotype merged 1 commit into
masterfrom
fix/issue-22-nounset
Sep 1, 2026
Merged

Support callers with nounset enabled#37
memotype merged 1 commit into
masterfrom
fix/issue-22-nounset

Conversation

@memotype

@memotype memotype commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • disable nounset inside the existing bj subshell
  • add implementation-parameterized regression coverage for object, array, string, number, boolean, null, nested, and missing-key queries under bash -u
  • verify that nounset remains enabled in the caller after bj returns
  • regenerate all compact artifacts

Rationale

bj inherits shell options from its caller and intentionally uses omitted helper arguments as compact mode flags. Under nounset, those optional positional-parameter expansions abort otherwise valid queries. Disabling nounset at the start of the existing bj subshell contains the option change within each invocation, preserves caller state, and avoids expanding the parser control flow. It adds seven bytes to the canonical compact form without increasing the wrapped line counts.

Testing

  • make verify
  • make -B all
  • git diff --exit-code

Closes #22

@memotype
memotype merged commit 6a52892 into master Sep 1, 2026
2 checks passed
@memotype
memotype deleted the fix/issue-22-nounset branch September 1, 2026 06:47
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.

Object and string parsing fails when caller enables set -u

1 participant