Generalisation of the class shellprogram