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 23344
- From: Vincent Bernat <bernat@xxxxxxxx>
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- Subject: Re: make history-complete-older do nothing on empty string
- Date: Wed, 18 Apr 2018 14:20:42 +0200
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=luffy.cx; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=postfix; bh=yXp7xNhoiMw4Yj+MuQa83QPz+Cg=; b=VyO dy/auhYDQ9OxXgkURP7q2NB2dlIzeu1FfUuNxomTs8pfI8zM6j1KM5ZLQqIeuyxO GoWrZ4NYPlWRAmWpt0yCZHF45elRtb487T7wgvEIe0CJ5Z/OjNNsWMRCvg7VZ/cP f6PkItfA5XbYCCTfsncxl6P0EG1rtlQlal8UcNhc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=luffy.cx; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=postfix; b=ZCivln/mkByPBueO3H8d0dltMmV7e aMW6rHvbXHioqUZJRVK3XqwIaTIIdhc7dk7E7yPFPIIVoxelUdJHpm9Rrn7ivO7v 5fvDzjgtm4VUTS/2GplvPAVDzxvVm77aqRRThzPvUfZf8W7Lz4ixQtaliyBlQSJG NDpH/cJG9XFaRg=
- In-reply-to: <20180418104555.25fef55b@camnpupstephen.cam.scsc.local> (Peter Stephenson's message of "Wed, 18 Apr 2018 10:45:55 +0100")
- 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
- 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>
❦ 18 avril 2018 10:45 +0100, Peter Stephenson <p.stephenson@xxxxxxxxxxx> :
> Sorry, yes, I tried this but copied it out of my history badly. It's
> got "zle -C" in front and there's an underscore (you should find
> _debug_history is already autoloaded). That's
>
>
> _debug_history() {
> _complete_debug _history_complete_word
> }
> zle -C _debug_history .complete-word _debug_history
> bindkey '^[/' _debug_history
Thanks!
So, the result file is 700k
+_history_complete_word:3> local expl direction stop curcontext=''
+_history_complete_word:5> [[ -z '' ]]
+_history_complete_word:6> curcontext=history-words:::
+_history_complete_word:11> [[ _debug_history = *newer ]]
+_history_complete_word:14> direction=older
+_history_complete_word:17> zstyle -t :completion:history-words::::history-words stop
+_history_complete_word:19> zstyle -T :completion:history-words::::history-words list
+_history_complete_word:21> [[ self-insert = _history-complete-* ]]
+_history_complete_word:70> _hist_stop=''
+_history_complete_word:71> _hist_old_prefix=''
+_history_complete_word:72> _history_complete_word_gen_matches
+_history_complete_word_gen_matches:2> [[ -n '' ]]
+_history_complete_word_gen_matches:4> _main_complete _history
+_main_complete:11> local IFS=$' \t\n\C-@'
+_main_complete:25> eval $'local -A _comp_caller_options;\n _comp_caller_options=(${(kv)options[@]});\n setopt localoptions localtraps localpatterns ${_comp_options[@]};\n local IFS=$\' \\t\\r\\n\\0\';\n builtin enable -p \\| \\~ \\( \\? \\* \\[ \\< \\^ \\# 2>&-;\n exec </dev/null;\n trap - ZERR;\n local -a reply;\n local REPLY;\n local REPORTTIME;\n unset REPORTTIME'
+(eval):1> local -A _comp_caller_options
+(eval):2> _comp_caller_options=( posixargzero off autolist on printexitvalue off kshzerosubscript off histreduceblanks off chaselinks off extendedglob on localloops off histnostore off automenu on globcomplete on unset on listpacked off promptsubst on shwordsplit off pathdirs off kshtypeset off listtypes on warncreateglobal off promptbang off dotglob off
[...]
+_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=(
[...my whole history]
I don't see where it should stop if there is no current word. I test
with "echo<space><meta-/>".
Thanks!
--
Use the fundamental control flow constructs.
- The Elements of Programming Style (Kernighan & Plauger)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author