bash history without duplicates

Bug #415217 reported by dino99
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
New
Wishlist
Unassigned

Bug Description

By default, when a command is used in a console, that one is saved in bash history.
The problem is that each new command is saved again even if that command exist in history. bash history become fatty & it's a pain to recall a previous command using arrows.

The solution is to modify the .bashrc file by adding:
export HISTCONTROL=ignoredups:erasedups

to prevent duplicates

Please, make that change as default.

Revision history for this message
dino99 (9d9) wrote : apport-collect data

Architecture: i386
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: bash 3.2-5ubuntu2
PackageArchitecture: i386
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=fr_FR.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-6.25-generic
Uname: Linux 2.6.31-6-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
dino99 (9d9) wrote :
tags: added: apport-collected
affects: linux (Ubuntu) → bash (Ubuntu)
Changed in bash (Ubuntu):
importance: Undecided → Wishlist
Revision history for this message
Lesmana Zimmer (lesmana) wrote :

edited the description

the original description implied that HISTCONTROL=erasedups will also erase duplicates from the history file. that is not the case. see bug #189881

description: updated
Revision history for this message
Rolf Leggewie (r0lf) wrote :

isn't ignoreboth the default in lucid? I suggest to mark this ticket as dupe of bug 189881.

Revision history for this message
Lesmana Zimmer (lesmana) wrote :

i was also considering to mark this bug as duplicate of bug #189881 but they really are two different bugs.

bug #189881 is about the request that HISTCONTROL=erasedups should also clear duplicates from the bash history file

this bug is about a request to have HISTCONTROL=erasedups as default in .bashrc (/etc/skel/.bashrc)

ignoreboth means ignorespace and ignoredups. erasedups is yet another thing.

Revision history for this message
dino99 (9d9) wrote :

hi devs,

good to know that you are working on that request; i agree that bug #189881 is a better request than this one, even if some details are different, the spirit is the same: instead of a full history where each command is logged everytime, for the ease of users to recall past commands: dont make duplicates, and if possible sort them by frequencies: the most used on top of history.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

I'd be sorry to disappoint you, but I'm not sure anyone is actually working on fixing this. With dino99's approval, I'll mark this as a dupe to bug 189881. I believe chances to see this fixed are only decreased by spreading things out into a number of variants.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.