Add some Pcmd helper functions to the pattern class.