da667 / Autosnort

Repo for autosnort scripts.
MIT License
157 stars 89 forks source link

No sleeping. No clearing. #3

Closed flowchartsman closed 12 years ago

flowchartsman commented 12 years ago

NOTE: I haven't tested this; it's just a quick edit to let you see where I'm going with this.  Please test it and make sure that it doesn't break anything.

Sleeping for informational purposes is no good.  If the user misses a message (or, god forbid, an opportunity to abort under certain circumstances), that's bad.  Prompt for choices, die on errors and otherwise let it scroll by.  If they really need something from the process, put it at the end as I've done here.  If they really want to see other messages, they can log them somewhere or use a scrollback buffer (or you can log them with a custom routine, which you probably should at some point).

Also, clearing the screen looks cool and tidy at first, but it means data is lost, and you will find that many users find the experience disconcerting: "What was that I saw when I looked back after looking away for a moment?  Was it important?".

flowchartsman commented 12 years ago

Whoops. Told you it was untested. Prompt was pulled from elsewhere. Let me push a better one.