This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Prune duplicate command history entries
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Andrew Burgess <andrew dot burgess at embecosm dot com>
- Cc: Patrick Palka <patrick at parcs dot ath dot cx>, gdb-patches at sourceware dot org
- Date: Wed, 3 Jun 2015 10:09:59 -0700
- Subject: Re: [PATCH] Prune duplicate command history entries
- Authentication-results: sourceware.org; auth=none
- References: <1433301766-20101-1-git-send-email-patrick at parcs dot ath dot cx> <20150603082036 dot GR17330 at embecosm dot com>
> > This patch implements pruning of duplicate command-history entries using
> > a modest amount of lookbehind. The motivation for this patch is to
> > reduce the prevalence of basic commands such as "up" and "down" in the
> > history file.
>
> Dropping commands such as up / down could be pretty annoying if you
> wanted to figure out where you were in the past. Dropping things like
> bt from the history would be less annoying.
I guess it's a question of preference, then. I know that my shell
merges all duplicate commands into one when it comes to the history,
and I really appreciate that feature. A Lot.
> I wonder if we should classify commands into navigation or
> state-changing commands and diagnostic commands.
> I'd be happier see repeated diagnostic commands disappear, and less so
> for commands that change inferior state, or navigate me around the
> stack.
FWIW, I'd find that distinction a little too complex for the gains
we're trying to achieve. At most, I'd just suggest one toggle to
activate duplicate merging or not. Just my 2 cents.
--
Joel