add another way to define functions to bash (fix #380)