Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Patrick Palka <patrick@parcs.ath.cx>
To: Pedro Alves <palves@redhat.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Add option to remove duplicate command history entries
Date: Tue, 09 Jun 2015 18:41:00 -0000	[thread overview]
Message-ID: <CA+C-WL_GBKrTMFDea6Egeu2u4yJEcbfTvvO7rZqVFwEHHXvmhQ@mail.gmail.com> (raw)
In-Reply-To: <55772C02.5080602@redhat.com>

On Tue, Jun 9, 2015 at 2:10 PM, Pedro Alves <palves@redhat.com> wrote:
> On 06/04/2015 05:21 PM, Patrick Palka wrote:
>> This patch implements the new option "history remove-duplicates", which
>> controls whether GDB should remove duplicate command-history entries
>> (off by default).
>>
>> The motivation for this option is to be able to reduce the prevalence of
>> basic commands such as "up" and "down" in the history file.  These
>> common commands crowd out more unique commands in the history file (when
>> the history file has a fixed size), and they make navigation of the
>> history file via ^P, ^N and ^R more inconvenient.
>>
>
> Did you consider bash's erasedups and ignoredups?  Specifically,
> this seems to implement something like erasedups, and I'm wondering
> how you'd fit in ignoredups in this option's UI.  Might be good to
> prepare for it with an enum instead, something like:
>
>   "set history duplicates ignore|erase|leave"
>
> WDYT?

An "ignoredups" option currently seems not useful in GDB since we
already have the empty-command shorthand for running the previous
command again, which does not add to the history.  But if we ever make
the empty-command shorthand toggle-able then an "ignoredups"
equivalent could be useful when the shorthand is turned off.  I am
actually thinking about implementing that too, since I do not like the
shorthand very much and would like to be able to turn it off.  So I
might as well implement "ignoredups" too.

>
> (haven't looked at the patch yet)
>
> Thanks,
> Pedro Alves
>


  reply	other threads:[~2015-06-09 18:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-04 16:22 Patrick Palka
2015-06-04 16:47 ` Eli Zaretskii
2015-06-04 18:54   ` Patrick Palka
2015-06-04 19:25     ` Eli Zaretskii
2015-06-09 18:10 ` Pedro Alves
2015-06-09 18:41   ` Patrick Palka [this message]
2015-06-10 15:12     ` Pedro Alves
2015-06-19 23:33       ` Patrick Palka
2015-06-20  6:52         ` Eli Zaretskii
2015-06-26 13:35         ` Patrick Palka
2015-06-26 14:18         ` Pedro Alves
2015-06-26 14:30           ` Patrick Palka
2015-06-26 14:50             ` Pedro Alves
2015-06-26 15:12         ` Patrick Palka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+C-WL_GBKrTMFDea6Egeu2u4yJEcbfTvvO7rZqVFwEHHXvmhQ@mail.gmail.com \
    --to=patrick@parcs.ath.cx \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox