Make generic code for printing prompt parts

Alsa fixes stashes output which did not work