bash add function to pattern classes named