From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44889 invoked by alias); 3 Jun 2015 08:20:44 -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 44879 invoked by uid 89); 3 Jun 2015 08:20:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mail-wi0-f176.google.com Received: from mail-wi0-f176.google.com (HELO mail-wi0-f176.google.com) (209.85.212.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 03 Jun 2015 08:20:42 +0000 Received: by wibdt2 with SMTP id dt2so3061513wib.1 for ; Wed, 03 Jun 2015 01:20:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=1chHmjYb1SD4isYaKHEGpy433sgB/Os2ZuZAMWNaYzg=; b=kK4btzdgas5TnT8drxQkxFJq7bTafEGuixzheDN3rmbL9XKHfGy8YTGYJAqlpgLyrL Kl55u0pj9OjiWMuT4bmUAMfdA/3sHK68DVJ08xB5xtlBpnVWx9u99mDfcVuCgRfDj7yH QwuQ/PJznqrqF5YmCjG5DfLvzFBQmnjD9KuzBU05p3KXqtEaET/CIc114G/gu1rrgObS mzrDwk2uCE8mL1A3p7FvMsLHaT9DpHn40JmqKeJk2V/RuSqT3lGHy38GHFR5NihOPvwv yuyIUS0hn0AKI1R5Qa2N5Icb62dQv3qiULA6tVRrFoFvw7uMhLMMkIpqpjWR7XlSMChG cpgg== X-Gm-Message-State: ALoCoQmbIi+jTszAu5phVUf6F+7ypkS7q4lT5nwXsTAXM5OMc//hv7RxUh21PqTAdaO73uShTVK1 X-Received: by 10.180.104.197 with SMTP id gg5mr39610464wib.27.1433319639317; Wed, 03 Jun 2015 01:20:39 -0700 (PDT) Received: from localhost (cust64-dsl91-135-5.idnet.net. [91.135.5.64]) by mx.google.com with ESMTPSA id n8sm477140wiy.19.2015.06.03.01.20.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jun 2015 01:20:38 -0700 (PDT) Date: Wed, 03 Jun 2015 08:20:00 -0000 From: Andrew Burgess To: Patrick Palka Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Prune duplicate command history entries Message-ID: <20150603082036.GR17330@embecosm.com> References: <1433301766-20101-1-git-send-email-patrick@parcs.ath.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433301766-20101-1-git-send-email-patrick@parcs.ath.cx> X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00038.txt.bz2 * Patrick Palka [2015-06-02 23:22:46 -0400]: > 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 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. > The maximum lookbehind is fixed to 50 (an arbitrary number) so that the > operation will be guaranteed to not take too long. I think at the very least you should make this threshold configurable. I'd then argue for off by default due to the loss of state changing commands being too annoying (for me). You should probably have some tests too, we already test C-p in readline.exp, so it should be possible to test that this feature works. Thanks, Andrew