Neat trick - the only change I made is to exit the while loop by typing "exit". That way the enter key runs the command with no arguments, and you can exit with control+c or by typing "exit".
Yes, if you have a commonly used command that has "exit" as a commonly used flag that means something other than exiting, then by all means use something more specific like "exit2".