added command history and handling of connecting all available tty devices