Open PhilHudson opened 3 years ago
@PhilHudson what sorts of statements could automatically be multi-lined? I guess you are talking about inserting back slashes and multi-lining single statements?
Precisely. Anything with one or more long-ish arguments.
Typically a single logical line may contain one or more levels of nested or chained sub-expressions: brace expansions, process substitions, pipelines, redirections, inline conditional branches using && and ||, etc. Individually or collectively these may take that line beyond the developer's configured line-wrap boundary, possibly multiple times.
Edge case: this minor mode should probably disable itself by default under crontab-mode and warn against being enabled, since shell commands in a crontab cannot be backslash-line-wrapped (because newlines within crontab shell commands have a special meaning and a special escape syntax using % instead of backslash).
Please consider adding out-of-the-box support for Bash shell script. It's very widely used in the Unix world.