From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87460 invoked by alias); 9 Jun 2015 18:41:23 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 87451 invoked by uid 89); 9 Jun 2015 18:41:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mail-ob0-f179.google.com Received: from mail-ob0-f179.google.com (HELO mail-ob0-f179.google.com) (209.85.214.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 09 Jun 2015 18:41:21 +0000 Received: by obbgp2 with SMTP id gp2so18707481obb.2 for ; Tue, 09 Jun 2015 11:41:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=4sfht6cEMizyEgE57gr6l+YlJzXToQT4znfHUqJmjPg=; b=SnCm2JTb/QcMURrINQm49uUcd4/EsrTy7+2nsoKQq6S1GdbeB+nZksrTAn4BAI9FmW 33IdIXP76i02ciiOBiyR+cmLSnMX+ru49wSEQ4qj9WJm5n1BT3saW+T8JyA+bmC/So4d hLurOY6ucdHcpVDbEt+6uwAciSicM5oav8Fn9BAIOqSlSGflzCzDlS2ds2YvEC2ynogh aI5r8WoPG12CzVMFi1uEnEsq4Yg+St8NuTvKXkTC9EuocCuoGRvkmt6oPoG+C6Tu075R q7ECahy/5x4mwvFBgLdlxucrHd1yZJIIUngA59dBlr+vLIi9FnjeOXKulLJCIWRc2PlE 5tIw== X-Gm-Message-State: ALoCoQnYxinhBQSyM/Tx69ICYxLnvQXUUvLwlH4vi7McT53mx9UQFyqDGJV0t7iJX0oBElIm/HVZ X-Received: by 10.202.225.65 with SMTP id y62mr19475749oig.78.1433875277260; Tue, 09 Jun 2015 11:41:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.96.167 with HTTP; Tue, 9 Jun 2015 11:40:56 -0700 (PDT) In-Reply-To: <55772C02.5080602@redhat.com> References: <1433434918-30948-1-git-send-email-patrick@parcs.ath.cx> <55772C02.5080602@redhat.com> From: Patrick Palka Date: Tue, 09 Jun 2015 18:41:00 -0000 Message-ID: Subject: Re: [PATCH] Add option to remove duplicate command history entries To: Pedro Alves Cc: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-06/txt/msg00149.txt.bz2 On Tue, Jun 9, 2015 at 2:10 PM, Pedro Alves 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 >