Use Shellharden for syntax highlighting and quoting suggestions
masterBy default, Shellharden operates like cat, providing syntax highlighting in foreground colors and suggesting quoting changes using background colors:
- Foreground colors: Syntax highlighting.
- Background colors (green/red): Indicates characters that Shellharden would add (green) or remove (red) if the
--transformoption were used.
Apply changes automatically
To automatically rewrite a script to follow ShellCheck-style quoting conformance, use the --transform flag.
WARNING: Do not apply --transform blindly. A script that relies on unquoted behavior (like implicit word splitting or glob expansion) will break after transformation. Always perform a manual code review after using this flag.