bug-bash
[Top][All Lists]
Advanced

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

Re: Inconsistent results when history -s is used within PROMPT_COMMAND


From: dennis
Subject: Re: Inconsistent results when history -s is used within PROMPT_COMMAND
Date: Tue, 16 Jun 2009 21:46:17 -0700

I agree with you that it's better to have an extra command. I can work 
around that behavior.

I'm sorry, I'm afraid I don't understand the following sentence:

history -s will not delete the previous history entry before pushing the 
new entry if it's added to a previous entry as part of a compound command.

Thanks for clarifying.

Dennis

----------------------------------------
From: "Chet Ramey" <chet.ramey@case.edu>
Sent: Tuesday, June 16, 2009 8:38 PM
To: dennis@netstrata.com
Subject: Re: Inconsistent results when history -s is used within 
PROMPT_COMMAND 

This is the result of an interaction between compound or multiline
commands, command-oriented history, and history -s.  history -s
will not delete the previous history entry before pushing the new
entry if it's added to a previous entry as part of a compound
command.  Otherwise, history -s used within a compound command will
remove the entire compound command from the history list.

This seems to be an unusual case; I'm not inclined to change the
current behavior.  Better to have an extra command in the history
than delete them inadvertently.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    chet@case.edu    
http://cnswww.cns.cwru.edu/~chet/

 


reply via email to

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