rewrite of vils in bash with some nice new features