Add bracket_sh function

Hello,

I took the liberty to add the bracket_sh function. We are playing with the notion of background processes on our shelly scripts, and we noticed that when doing them they were not being cleaned up correctly. After adding this patch things worked as expected.

NOTE: Changes were tested with shelly-testsuite

Also, emacs removed some trailing whitespaces that were around the code.

Cheers.