spin out termio.c and readd colour support