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.ra...@case.edu> Sent: Tuesday, June 16, 2009 8:38 PM To: den...@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 c...@case.edu http://cnswww.cns.cwru.edu/~chet/