[Bug 924818] New: Duplicates are NOT being removed from history in 13.1 when HISTCONTROL=erasedups is set
http://bugzilla.opensuse.org/show_bug.cgi?id=924818 Bug ID: 924818 Summary: Duplicates are NOT being removed from history in 13.1 when HISTCONTROL=erasedups is set Classification: openSUSE Product: openSUSE 13.1 Version: Final Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: drankinatty@suddenlinkmail.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Duplicates are NOT being removed from history in 13.1 when HISTCONTROL=erasedups is set. A value of HISTCONTROL=erasedups causes all previous lines matching the current line to be removed from the history list before that line is saved. (man bash) This isn't working on 13.1 (confirmed by others in 12.3) and I suspect it is the case with 13.2 as well. Searching, it looks like other distros have patched bash to insure this works when multiple terminals are open. (e.g.: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/189881) After moving my history file from 11.4 to 13.1 and running for close to a year, I have close to 14,000 duplicate lines -- despite having 'erasedups' set: current lines: 20000 - uniq lines: 6099 = 13901 duplicates As a workaround, I wrote the current file out, then sorted uniquely, then deleted the current history, read the sorted unique file in as current, and wrote the current back to HISTFILE: $ history -w | sort | uniq > uniqfile $ history -c $ history -r uniqfile $ history -w $ rm uniqfile This is a bug and manual removal of duplicate history entries should not be required when HISTCONTROL=erasedups is set. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=924818
--- Comment #1 from David Rankin
http://bugzilla.opensuse.org/show_bug.cgi?id=924818
Bernhard Wiedemann
participants (1)
-
bugzilla_noreply@novell.com