Considering the large amount of questions which turn out to be related to subshells in Bash ("Why doesn't my variable increment in this piped
while read loop?"), I just thought it would be very nice to refer to some editor or service where code which will be executed in subshells is formatted differently from the code executed in the parent shell. It might be useful as an educational device (see the difference between
code | code and
code < <(code) instantly). Does this exist?
Bonus points if anyone implements it for jEdit or VIm.
Obviously it doesn't have to be perfect (no syntax highlighting is, in my experience), but I suspect things like
(foo=bar; echo $foo;) and
command | while read ... shouldn't be too difficult for a start.