Subject: _history-complete-older problems with $(
From: Sebastian Gniazdowski <[email-masked]>
To: Zsh hackers list <[email-masked]>
Date: Sun, 10 Jan 2016 20:35:56 +0100
List-Id: Zsh Workers List <zsh-workers.zsh.org>

Hello
$(<Alt-/> doesn't complete $(( 0+1 )) correctly. When I empty my
~/.zhistory and do:

set HISTSIZE=3
a=""
a="${(r:100000:: _:)a}"
echo $(( 0+1 ))

then $<Alt-/> works, but $(<Alt-/> doesn't. The completing is setup with:

setopt hist_lex_words
bindkey "^[/" _history-complete-older
zstyle ':completion:*:history-words' remove-all-dups true
zstyle ':completion:*' range 50000:10000

Also, the remove-all-dups zstyle doesn't work which may be verified by doing:

set HISTSIZE=3
echo $(( 0+1 ))
a="${(r:100000:: _:)a}"
echo $(( 0+1 ))

and doing echo $(<Alt-/> – there will be echo shown twice, so as $(( 0+1 ))

(If I don't empty ~/.zhistory, then Alt-/ sometimes wants me to
propose hundreds of words, apparently taken from ~/.zhistory, so this
ignores HISTSIZE).

Best regards,
Sebastian Gniazdowski