classify every terminal output line by cmd id

assumes patch 4dfc7bb57890cf3a97606c2795173f2b42abfcae is accepted
restore archived status after every groups redraw

not so nice because it introduces noticeable ui blocks for every group
list redraw like new command or new connection