Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-31 Thread Raphaël
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

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-30 Thread Stephane Chazelas
2014-01-30 12:45:58 +0200, Pierre Gaston: > On Thu, Jan 30, 2014 at 12:37 PM, Dan Jacobson wrote: > > > Thanks fellows but now bash has become very slow to the touch that way. > > > > Maybe try something like: PROMPT_COMMAND='read -t0 && sleep 10' Or PROMPT_COMMAND="perl -MPOSIX -e 'tcflush 0,

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-30 Thread Dan Jacobson
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 SEC

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-30 Thread Dan Jacobson
case $- in *i*) saftey_seconds=5 SECONDS=1 PROMPT_COMMAND="if ((SECONDS==0)); then echo TOO FAST HOLMES, waiting \ $saftey_seconds seconds or hit ^C; sleep $saftey_seconds; else SECONDS=0; fi" esac

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-30 Thread Dan Jacobson
Ah ha! Thanks for the private tip 4 minutes ago. This works!: saftey_seconds=5 PROMPT_COMMAND='if ((SECONDS==0)); then echo TOO FAST HOLMES, waiting '\ $saftey_seconds' seconds or hit ^C; sleep '$saftey_seconds'; else SECONDS=0; fi' Hope somebody documents it somewhere as otherwise, well, "the sh

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-30 Thread Pierre Gaston
On Thu, Jan 30, 2014 at 12:56 PM, Dan Jacobson wrote: > > "PG" == Pierre Gaston writes: > PG> Maybe try something like: PROMPT_COMMAND='read -t0 && sleep 10' > > But how will that on its own stop me from dumping tons of lines of junk > into bash via one accidental mouse click? > Well if the

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-30 Thread Dan Jacobson
> "PG" == Pierre Gaston writes: PG> Maybe try something like: PROMPT_COMMAND='read -t0 && sleep 10' But how will that on its own stop me from dumping tons of lines of junk into bash via one accidental mouse click?

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-30 Thread Pierre Gaston
On Thu, Jan 30, 2014 at 12:37 PM, Dan Jacobson wrote: > Thanks fellows but now bash has become very slow to the touch that way. > Maybe try something like: PROMPT_COMMAND='read -t0 && sleep 10'

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-30 Thread Dan Jacobson
Can you somehow give the user his prompt first and then wait, instead of the other way around? Also rapid ^P RET ^P RET should somehow be exempt.

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-30 Thread Dan Jacobson
Thanks fellows but now bash has become very slow to the touch that way.

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-29 Thread Aharon Robbins
In article , wrote: >Gentlemen, I have once again come up with a million dollar idea for bash, >revolutionizing the shell world. > >As we all know, nobody in their right mind could type more than one >command per second into bash when in interactive mode. > &

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-29 Thread Chris Down
On 2014-01-29 21:03:12 -0700, Bob Proulx wrote: > Eduardo A. Bustamante López wrote: > > Chris Down wrote: > > > Well, you can do this with PROMPT_COMMAND='sleep 1'. I don't see the > > > need for another internal variable to do this. > > > > How would that work to avoid filling the prompt with the

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-29 Thread Eduardo A . Bustamante López
On Wed, Jan 29, 2014 at 09:03:12PM -0700, Bob Proulx wrote: > Eduardo A. Bustamante López wrote: > > Chris Down wrote: > > > Well, you can do this with PROMPT_COMMAND='sleep 1'. I don't see the > > > need for another internal variable to do this. > > > > How would that work to avoid filling the pro

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-29 Thread Bob Proulx
Eduardo A. Bustamante López wrote: > Chris Down wrote: > > Well, you can do this with PROMPT_COMMAND='sleep 1'. I don't see the > > need for another internal variable to do this. > > How would that work to avoid filling the prompt with the paste buffer > when I fat finger and paste a whole email to

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-29 Thread Eduardo A . Bustamante López
On Thu, Jan 30, 2014 at 10:44:30AM +0800, Chris Down wrote: > On 2014-01-30 09:18:19 +0800, jida...@jidanni.org wrote: > > So let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND=1.0 > > Well, you can do this with PROMPT_COMMAND='sleep 1'. I don't

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-29 Thread Chris Down
On 2014-01-30 09:18:19 +0800, jida...@jidanni.org wrote: > So let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND=1.0 Well, you can do this with PROMPT_COMMAND='sleep 1'. I don't see the need for another internal variable to do this. pgpTYMNSu6HsQ.pgp Description: PGP signature

let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-29 Thread jidanni
Gentlemen, I have once again come up with a million dollar idea for bash, revolutionizing the shell world. As we all know, nobody in their right mind could type more than one command per second into bash when in interactive mode. So let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_CO