bug-bash
[Top][All Lists]
Advanced

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

Re: Process name into job control and trap DEBUG


From: Bob Proulx
Subject: Re: Process name into job control and trap DEBUG
Date: Sat, 5 Nov 2005 16:40:17 -0700
User-agent: Mutt/1.5.9i

Not seeing anyone else answering I will jump in even though I don't
share history myself and don't know this topic in detail.

Julien Allali wrote:
>    I use to trap function as follow:
> 
> function histo(){
>   history -a;
>   history -r;
> }
> 
> trap histo DEBUG

Instead of using the debug trap I think it is much better to use the
PROMPT_COMMAND.

> The bug is the following:
> $ emacs &
> $ jobs
> [1]+  Running                 history -r &
> 
> In addition I would like to know if there is another way to force 
> history to be synchronise after each command.

Setting your histo function in PROMPT_COMMAND instead of in the debug
trap would probably solve your problem.

  PROMPT_COMMAND='history -a;history -r'

Bob




reply via email to

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