[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND
From: |
Chris Down |
Subject: |
Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND |
Date: |
Thu, 30 Jan 2014 13:40:48 +0800 |
User-agent: |
Mutt/1.5.22 (2013-10-16) |
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 paste buffer
> > when I fat finger and paste a whole email to the prompt? It will just
> > slow down the process, but not cancel it.
>
> It would give you plenty of time to hit Control-C to interrupt it.
> Try it and you will see.
Yeah, that's what I had in mind.
The one thing worth mentioning is that the first line will still get
executed immediately. PROMPT_COMMAND is run just before PS1 is printed.
One way to get around this is to use the debug trap instead:
shopt -s extdebug
trap 'sleep 1' DEBUG
pgpwBO8aYi9yj.pgp
Description: PGP signature
- let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND, jidanni, 2014/01/29
- Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND, Chris Down, 2014/01/29
- Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND, Eduardo A . Bustamante López, 2014/01/29
- Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND, Bob Proulx, 2014/01/29
- Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND, Eduardo A . Bustamante López, 2014/01/29
- Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND,
Chris Down <=
- Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND, Dan Jacobson, 2014/01/30
- Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND, Pierre Gaston, 2014/01/30
- Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND, Dan Jacobson, 2014/01/30
- Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND, Pierre Gaston, 2014/01/30
- Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND, Stephane Chazelas, 2014/01/30
- Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND, Dan Jacobson, 2014/01/30