On Thu, Jan 30, 2014 at 08:23:36PM +0800, Dan Jacobson wrote:
> OK fixed spelling.
> Put in .bashrc to prevent accidental execution of many line clipboard paste 
> dumps:
> case $- in *i*)
>      safety_seconds=5 SECONDS=1
>      PROMPT_COMMAND="if ((SECONDS==0)); then echo TOO FAST HOLMES, waiting \
>      $safety_seconds seconds or hit ^C; sleep $saftey_seconds; else 
> SECONDS=0; fi"
> esac


very nice ! (excepting the $saftey_seconds typo)

Sadly, typing quickly / pressing ^C or <Enter> (which I guess isn't an
uncommon behavior) will trigger this.
Could that be technically possible that it does not apply to empty lines
(I would not care much about pasting a bunch of empty lines)

Reply via email to