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: 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

Attachment: pgpwBO8aYi9yj.pgp
Description: PGP signature


reply via email to

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