Port from urwid to cmd.