bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND


From: Raphaël
Subject: Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND
Date: Sat, 1 Feb 2014 01:49:59 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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

[Prev in Thread] Current Thread [Next in Thread]