Skip to content

v0.3.1

Latest

Choose a tag to compare

@jhheider jhheider released this 18 Jul 22:39
053f6dc

Patch release: line-faithful $0 handling, the emit inspection command, and a dockerized cross-shell compatibility suite. No breaking changes.

Fixes

  • $0 rewrite for shebang-less scripts now applies (previously $0 stayed the fd path on bash>=5 / zsh when the script had no shebang). (#3, closes #1)
  • $0 reset is line-faithful and lint-clean. The reset is joined onto the first body line with ; instead of swapping the shebang, so error line numbers stay exact and the served copy keeps its shell dialect (no added shellcheck findings). (#4)

New

  • scriptbox emit [INTERP] <SCRIPT> prints the exact bytes scriptbox would hand the interpreter after the $0 rewrite - useful for inspection and as a shellcheck target. Honors --argv0 and frontmatter. (#4, #5)
  • emit --subscripts (full-featured builds) recursively dumps the whole reachable tree - the script plus every resolvable source include and shell child - under # ==> <path> headers, with dynamic/immune sites noted rather than dropped. (#6)
  • Dockerized cross-shell compatibility suite (compat/): transparency, insulation, $0, and "no added linter findings" checks across bash/zsh/dash/ksh, plus a read-only pass over real public installers. (#2)

Install

brew install jhheider/tap/scriptbox        # or: brew upgrade scriptbox
curl -fsSL https://heider.cc/scriptbox.sh | sh