Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: make history-complete-older do nothing on empty string
- X-seq: zsh-users 23345
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: make history-complete-older do nothing on empty string
- Date: Wed, 18 Apr 2018 13:58:17 +0100
- Cms-type: 201P
- 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=
- In-reply-to: <874lk866zp.fsf@luffy.cx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Organization: SCSC
- References: <CGME20180418052832epcas2p1df623a44c88edae226f65a2d5edc90f2@epcas2p1.samsung.com> <m3tvs9um1s.fsf@luffy.cx> <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 <bernat@xxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author