Thilo Six wrote: > Hello > > Today i came across this neat feature but unfortunately i have a problem with > it. > > ~/.bashrc > <---------------------------- > export HISTCONTROL=erasedups > ----------------------------> > > $ history > 1 history > > $ top > $ htop > $ top > $ htop > $ history > 1 top > 2 htop > 3 history > > > i close this shell and open a new terminal: > > $ history > 1 top > 2 htop > 3 history > > $ top > $ htop > > i close this shell again and *now* i get: > > $ history > 1 top > 2 htop > 3 top > 4 htop > 5 history > > So it seems to me entries already written to ~/.bash_history are not > "eliminated". > Is this the supposed behaviour?
The erasedups feature works correctly: it removes matching commands from the history list, which is kept in memory. When the shell exits, by default it appends the current history list to the history file. If you want to force the history file to be completely rewritten, you can use `history -w' at shell exit to rewrite it. There is, unfortunately, currently no easy way to force the `rewrite-at-exit' behavior. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Live Strong. No day but today. Chet Ramey, ITS, CWRU [EMAIL PROTECTED] http://cnswww.cns.cwru.edu/~chet/ _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash