about summary refs log tree commit diff
path: root/Completion/Core
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:07:01 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:07:01 +0000
commit2db1c53cb90d9f299f4a7636244d8024ed235ae7 (patch)
tree5511daa6431b05a4dd81889f4dccc96e9f3752ec /Completion/Core
parentcbbb15dc98a90d8ff757c00dcff5804c71c6e5af (diff)
downloadzsh-2db1c53cb90d9f299f4a7636244d8024ed235ae7.tar.gz
zsh-2db1c53cb90d9f299f4a7636244d8024ed235ae7.tar.xz
zsh-2db1c53cb90d9f299f4a7636244d8024ed235ae7.zip
moved to Completion/Base/Completer/_history
Diffstat (limited to 'Completion/Core')
-rw-r--r--Completion/Core/_history60
1 files changed, 0 insertions, 60 deletions
diff --git a/Completion/Core/_history b/Completion/Core/_history
deleted file mode 100644
index 63878ac1c..000000000
--- a/Completion/Core/_history
+++ /dev/null
@@ -1,60 +0,0 @@
-#autoload
-
-# Hm, this *can* sensibly be used as a completer. But it could also be used
-# as a utility function, so maybe it should be moved into another directory.
-# Or maybe not. Hm.
-#
-#
-# Complete words from the history
-#
-# Code taken from _history_complete_words.
-#
-# Available styles:
-#
-#   sort --  sort matches lexically (default is to sort by age)
-#   remove-all-dups --
-#            remove /all/ duplicate matches rather than just consecutives
-#   range -- range of history words to complete
-
-local opt expl max slice hmax=$#historywords beg=2
-
-if zstyle -t ":completion:${curcontext}:" remove-all-dups; then
-  opt=-
-else
-  opt=-1
-fi
-
-if zstyle -t ":completion:${curcontext}:" sort; then
-  opt="${opt}J"
-else
-  opt="${opt}V"
-fi
-
-if zstyle -s ":completion:${curcontext}:" range max; then
-  if [[ $max = *:* ]]; then
-    slice=${max#*:}
-    max=${max%:*}
-  else
-    slice=$max
-  fi
-  [[ max -gt hmax ]] && max=$hmax
-else
-  max=$hmax
-  slice=$max
-fi
-
-PREFIX="$IPREFIX$PREFIX"
-IPREFIX=
-SUFFIX="$SUFFIX$ISUFFIX"
-ISUFFIX=
-
-# We skip the first element of historywords so the current word doesn't
-# interfere with the completion
-
-while [[ $compstate[nmatches] -eq 0 && beg -lt max ]]; do
-  _wanted "$opt" history-words expl 'history word' \
-      compadd -Q -a 'historywords[beg,beg+slice]'
-  (( beg+=slice ))
-done
-
-(( $compstate[nmatches] ))