sh Helper — Understand and Improve Any Shell Script

An sh helper that walks through your POSIX shell script line by line, explains what each block does, and flags every bashism or unsafe pattern.

What the helper explains

IFS=' '         # helper: default is space+tab+newline; setting to space only
trap '' TERM     # helper: ignoring SIGTERM; explain why this matters
cd -- "$dir" || exit 1   # helper: `--` guards against dirs starting with `-`

Line-by-line for POSIX sh

Every non-trivial construct gets a plain-English explanation, tuned for POSIX semantics. No Bash-only feature assumptions.

Warnings surfaced

Bashisms (arrays, [[ ]], process substitution), missing quoting, unset variable expansion, subshell state loss, and portability concerns for BusyBox and dash.

Team-friendly output

Export the explanation and warnings as Markdown to include in a code-review comment or handover doc.

Frequently asked questions

Does the sh helper run my script?
No — pure static analysis.
Does it understand POSIX-only constructs?
Yes. If your shebang is #!/bin/sh, findings and explanations stay within POSIX semantics.
Can I use it for zsh or fish?
It targets POSIX sh and Bash. zsh and fish have their own semantics — findings may not be accurate for those shells.