zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-users@zsh.org
Subject: Re: make history-complete-older do nothing on empty string
Date: Wed, 18 Apr 2018 13:58:17 +0100	[thread overview]
Message-ID: <20180418135817.7edca58c@camnpupstephen.cam.scsc.local> (raw)
In-Reply-To: <874lk866zp.fsf@luffy.cx>

On Wed, 18 Apr 2018 14:20:42 +0200
Vincent Bernat <bernat@luffy.cx> 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


  reply	other threads:[~2018-04-18 12:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180418052832epcas2p1df623a44c88edae226f65a2d5edc90f2@epcas2p1.samsung.com>
2018-04-18  5:21 ` Vincent Bernat
2018-04-18  8:40   ` Peter Stephenson
2018-04-18  9:15     ` Vincent Bernat
2018-04-18  9:45       ` Peter Stephenson
2018-04-18 12:20         ` Vincent Bernat
2018-04-18 12:58           ` Peter Stephenson [this message]
2018-04-18 13:28             ` Peter Stephenson
2018-04-18 16:15               ` Vincent Bernat
2018-04-18 16:11             ` Bart Schaefer
2018-04-18 16:28               ` Vincent Bernat
2018-04-18 18:41               ` Vincent Bernat
2018-04-18 18:53                 ` Ray Andrews
2018-04-19  5:49                   ` Vincent Bernat
2037-12-03 12:10                     ` Ray Andrews
2037-12-03 14:36                       ` Ray Andrews

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180418135817.7edca58c@camnpupstephen.cam.scsc.local \
    --to=p.stephenson@samsung.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).