From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21799 invoked by alias); 18 Apr 2018 12:58:40 -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: 23345 Received: (qmail 235 invoked by uid 1010); 18 Apr 2018 12:58:40 -0000 X-Qmail-Scanner-Diagnostics: from mailout2.w1.samsung.com 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(210.118.77.12):SA:0(-1.9/5.0):. Processed in 14.639165 secs); 18 Apr 2018 12:58:40 -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_HELO_PASS, SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: p.stephenson@samsung.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180418125820euoutp02fcc3ab9fdb2826a360e7123b1c095a83~miSGFXWJa0787907879euoutp02K DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1524056301; bh=G3YQ+i5sA0/q3FcwC8BmNzYtkYWK8A7Jr9vFAYHqEOk=; h=Date:From:To:Subject:In-reply-to:References:From; b=UWUoxjri2fX92eWW5rcBA+uT+/nuUc1HTXDcXKgaFP0dcL+JHliZqwedWZVTjqFXc 7WccueM+88oHFBJP0b00coFXiNzLgkB6BgYxbHLd2eDxxvi2C9u6jSdRLlCJFTPq/w na0bow0Ttqu+ut55qNvVZYhx3kN8e92IAlE78pqc= X-AuditID: cbfec7f5-b45ff700000028a9-d2-5ad740eb4442 Date: Wed, 18 Apr 2018 13:58:17 +0100 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: make history-complete-older do nothing on empty string Message-id: <20180418135817.7edca58c@camnpupstephen.cam.scsc.local> In-reply-to: <874lk866zp.fsf@luffy.cx> Organization: SCSC X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEIsWRmVeSWpSXmKPExsWy7djPc7qvHa5HGfRN0rDYcXIlowOjx6qD H5gCGKO4bFJSczLLUov07RK4MvZ/6WApeMJb8eTEFJYGxn7uLkZODgkBE4kPPa8Yuxi5OIQE VjBKrF89hwXC6WaSaHr6nR2mam3rTaiqZYwSq751sEI4U5gkjj/cxApSJSRwhlGi91o6ROIC o8Ts+SeYQBIsAqoSCz+8BrPZBAwlpm6azQhiiwiISixfsRloBQeHsICzxLo1cSBhXiDz1dsl YJs5BdQk5t2ZxgxSwi8gJHGh2RbiIHuJo3tOMkGUC0r8mHyPBcRmFtCR2LbtMTuELS+xec1b ZpBzJASmsEn8aFrHBtHsIjF1zxRmCFtY4tXxLVBfykhcntzNAtHQzCix9v59qIYeRolZi0Mh bGuJvtsXGSE28ElM2jYd7DgJAV6JjjYhCNND4vlJaYhqR4k9dzugwbOUSWLfFu4JjPKzkJw9 C8nZs5CcvYCReRWjeGppcW56arFxXmq5XnFibnFpXrpecn7uJkZgzJ/+d/zrDsZ9f5IOMQpw MCrx8C4QuBYlxJpYVlyZe4hRgoNZSYR35+MrUUK8KYmVValF+fFFpTmpxYcYpTlYlMR54zTq ooQE0hNLUrNTUwtSi2CyTBycUg2MjHJzM9bsET82Zf3p2XELiq3SMrLMrxs/KWp8sV1mn7YC K4v980+zWH8Lv46Yb9T6nJ3z36q5wdzts6+3NaU13dH6Ws3Z8e+K2YvJ737c2Ho8+8Ad7hq3 rT0M27z5VWcs2H+F01ctLXebu8cRthVl3z7Xb9cqnp04T9E0qyMkno3rgoL3qeuNSizFGYmG WsxFxYkAhtFQXvUCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrELMWRmVeSWpSXmKPExsVy+t/xy7qvHK5HGZydbG2x4+RKRgdGj1UH PzAFMEZx2aSk5mSWpRbp2yVwZez/0sFS8IS34smJKSwNjP3cXYycHBICJhJrW28ydjFycQgJ LGGUeHZtIQuEM41J4mDjKXYI5xyjxIp786CcC4wSs7ZeZwLpZxFQlVj44TWYzSZgKDF102xG EFtEQFRi+YrNQA0cHMICzhLr1sSBhHmBzFdvl7CD2JwCahLz7kxjBrGFBJYzSazsrwAp5xcQ krjQbAtxnb3E0T0nmSBaBSV+TL7HAmIzC2hJbN7WxAphy0tsXvMWaoy6xI27u9knMArNQtIy C0nLLCQtCxiZVzGKpJYW56bnFhvpFSfmFpfmpesl5+duYgSG7LZjP7fsYOx6F3yIUYCDUYmH d4HAtSgh1sSy4srcQ4wSHMxKIrw7H1+JEuJNSaysSi3Kjy8qzUktPsQozcGiJM573qAySkgg PbEkNTs1tSC1CCbLxMEp1cB4tZCLVe2R2xafvOZ5zWVsy7boxa+YsHC/nwf3gZ0Lp3gsyd7w eIVN+5+1e8KEuCUqdW53vklvfrL4s82raZd0Kja4971Q0pvhJ8a0xvUCm8ndY3WJ9hxrvHIe HuqvFeaW/Hn+ZOGeVYyzbK8u53x/7/3Rya1frqv29jU974veO5Nn1eku3+ydSizFGYmGWsxF xYkAmFN3XFUCAAA= X-CMS-MailID: 20180418125819eucas1p1665ab157cccb33528df61971c8bb6b42 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180418052832epcas2p1df623a44c88edae226f65a2d5edc90f2 X-RootMTR: 20180418052832epcas2p1df623a44c88edae226f65a2d5edc90f2 References: <20180418094018.54559594@camnpupstephen.cam.scsc.local> <87in8o6fjx.fsf@luffy.cx> <20180418104555.25fef55b@camnpupstephen.cam.scsc.local> <874lk866zp.fsf@luffy.cx> On Wed, 18 Apr 2018 14:20:42 +0200 Vincent Bernat wrote: > +_history:19> local opt expl max slice hmax=66742 beg=2 > +_history:21> zstyle -t :completion:history-words:history::: remove-all-dups > +_history:22> opt=- > +_history:27> zstyle -t :completion:history-words:history::: sort > +_history:30> opt=-V > +_history:33> zstyle -s :completion:history-words:history::: range max > +_history:42> max=66742 > +_history:43> slice=66742 > +_history:46> PREFIX='' > +_history:47> IPREFIX='' > +_history:48> SUFFIX='' > +_history:49> ISUFFIX='' > +_history:54> local -a hslice > +_history:55> [[ 0 -eq 0 && beg -lt max ]] > +_history:56> [[ -n '' ]] > +_history:58> hslice=( 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.) Is the behaviour acceptable if you use the style, for example: zstyle ':completion:history-words:*' range 100 ? Here's a way of getting timing information in the debug by changing _complete_debug (you'd probably have to copy it into your $fpath). diff --git a/Completion/Base/Widget/_complete_debug b/Completion/Base/Widget/_complete_debug index 85a0f37..1ff7630 100644 --- a/Completion/Base/Widget/_complete_debug +++ b/Completion/Base/Widget/_complete_debug @@ -15,7 +15,7 @@ integer debug_fd=-1 fi local -a debug_indent; debug_indent=( '%'{3..20}'(e. .)' ) - local PROMPT4 PS4="${(j::)debug_indent}+%N:%i> " + local PROMPT4 PS4="${(j::)debug_indent}+%D{%S.%.}:%N:%i> " setopt xtrace : $ZSH_NAME $ZSH_VERSION ${1:-_main_complete} pws