From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26389 invoked by alias); 18 Apr 2018 16:15:32 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23348 Received: (qmail 22800 invoked by uid 1010); 18 Apr 2018 16:15:31 -0000 X-Qmail-Scanner-Diagnostics: from bart.luffy.cx by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(78.47.78.131):SA:0(-1.9/5.0):. Processed in 11.959431 secs); 18 Apr 2018 16:15:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: bernat@luffy.cx X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=luffy.cx; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=postfix; bh=gbL3aHDQZLTzXrsn2JyYjWi2avA=; b=YSS 6Bgfjj/G5GZmWPfp6mrEYUGe/EfdPeSQI98tRw56DgTX6u3xDJphiPcTqAxFfltR pIaOvEccfLI6S02EUY7vXSpe+GPs7eAHZR9OwJAWJOn6bMHkZ08uIKQ5G7uWOAAV ivwUCBhOFiRROpK7nhWyWut/bEUSrp2GfPND1CJg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=luffy.cx; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=postfix; b=JCsSYLRZ2kVoQnDY89zhv8KfEr4O0 PHVF9EuV9v0Wi+xMxtU2PFVpE9Zdk98Lrn9mGdqexAnic1eUmV6pQfWr/6WQiCq8 0ZzY55yjcP5VrJ7U3PAh6cf1lXXex++wl8pDdejxPZimBx7AwjTiQY/8xjwZJDHu l+1xl9xLzq6PJQ= From: Vincent Bernat To: Peter Stephenson Cc: zsh-users@zsh.org Subject: Re: make history-complete-older do nothing on empty string References: <20180418094018.54559594@camnpupstephen.cam.scsc.local> <87in8o6fjx.fsf@luffy.cx> <20180418104555.25fef55b@camnpupstephen.cam.scsc.local> <874lk866zp.fsf@luffy.cx> <20180418135817.7edca58c@camnpupstephen.cam.scsc.local> <20180418142845.1b473020@camnpupstephen.cam.scsc.local> Date: Wed, 18 Apr 2018 18:15:14 +0200 In-Reply-To: <20180418142845.1b473020@camnpupstephen.cam.scsc.local> (Peter Stephenson's message of "Wed, 18 Apr 2018 14:28:45 +0100") Message-ID: <87fu3s4hkd.fsf@luffy.cx> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =E2=9D=A6 18 avril 2018 14:28 +0100, Peter Stephenson =C2=A0: >> So when you interrupted it it was apparently reading in 66742 history >> words; there's nothing further at the end of the file? (We can tweak >> complete_debug to add timing info if it's helpful, see below.) > > Come to think of it, the fact that it's outputting all those words for > debug purposes is going to make a big difference, so I'm not sure how > much this is telling us. If this turns out not to be the crucial point, > we can disable debugging around it. There was additional output, but I thought it was meaningless since I think it shouldn't try to complete at all when the current word is empty. For the remaining: http://paste.debian.net/1020908/ > >> Is the behaviour acceptable if you use the style, for example: >>=20 >> zstyle ':completion:history-words:*' range 100 >>=20 >> ? > > This should give some indication, though. Yes, with this, it works fast. However, it doesn't use all history anymore for regular completion. The search is done only on the last 100 items of the history. I would prefer to have complete completion when there is at least one character in the current word and nothing when not. I don't think people are interested to expand the empty word with the content of the history. In the meantime, this is a good workaround. Thanks! --=20 It is a wise father that knows his own child. -- William Shakespeare, "The Merchant of Venice"