about summary refs log tree commit diff
path: root/Completion/Commands/_history_complete_word
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-31 09:38:25 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-31 09:38:25 +0000
commitfd25b24df6b4f098944c4994195d3894a27a8208 (patch)
tree53f7f940844ab34c7349506622fc8241c782f98c /Completion/Commands/_history_complete_word
parent4629133ad33dacef459ad9fa5ca438836a1be9fb (diff)
downloadzsh-fd25b24df6b4f098944c4994195d3894a27a8208.tar.gz
zsh-fd25b24df6b4f098944c4994195d3894a27a8208.tar.xz
zsh-fd25b24df6b4f098944c4994195d3894a27a8208.zip
use compadd -[ak] (11549)
Diffstat (limited to 'Completion/Commands/_history_complete_word')
-rw-r--r--Completion/Commands/_history_complete_word5
1 files changed, 3 insertions, 2 deletions
diff --git a/Completion/Commands/_history_complete_word b/Completion/Commands/_history_complete_word
index bb7e44200..00d7ba369 100644
--- a/Completion/Commands/_history_complete_word
+++ b/Completion/Commands/_history_complete_word
@@ -70,7 +70,7 @@ _history_complete_word () {
 }
 
 _history_complete_word_gen_matches () {
-  local opt
+  local opt h_words
 
   [[ -n "$_hist_stop" ]] && PREFIX="$_hist_old_prefix"
 
@@ -85,8 +85,9 @@ _history_complete_word_gen_matches () {
     opt="${opt}V"
   fi
 
+  h_words=( "${(@)historywords[2,-1]}" )
   _wanted "$opt" history-words expl 'history word' \
-      compadd -Q - "$historywords[@]"
+      compadd -Q -a h_words
 
   zstyle -t ":completion:${curcontext}:history-words" list ||
       compstate[list]=