On 22 Jul 2002, Ron Johnson wrote: > Ok, I'll bite. How do you drain input before displaying the > prompt? Would that "input draining" affect things, since > instead of just pasting one command, I pasted 2?
You use a non blocking read on stdin until there is no data to read before displaying the prompt. That ensures that you have to type something after the prompt is shown. It makes things like yes | apt-get not work though, and generally isn't necessary. Jason -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

