Improve compatibility across OSes, terminals, tmux, etc.