added proc to scan cmd line for tty name