Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: make history-complete-older do nothing on empty string



 ❦ 18 avril 2018 14:28 +0100, Peter Stephenson <p.stephenson@xxxxxxxxxxx> :

>> 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:
>> 
>> zstyle ':completion:history-words:*' range 100
>> 
>> ?
>
> 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!
-- 
It is a wise father that knows his own child.
		-- William Shakespeare, "The Merchant of Venice"



Messages sorted by: Reverse Date, Date, Thread, Author