summary refs log tree commit diff
path: root/Completion/Base/_first
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-11 07:57:56 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-11 07:57:56 +0000
commitfac3086d9782e73dcaf1aa65fd36a0b63a374719 (patch)
tree7bab35e2787ca17f02ec932dffae1bfff2ffcfe3 /Completion/Base/_first
parent37012f06a7e5e8a64614dbf9032c77cff1bcfcfb (diff)
downloadzsh-fac3086d9782e73dcaf1aa65fd36a0b63a374719.tar.gz
zsh-fac3086d9782e73dcaf1aa65fd36a0b63a374719.tar.xz
zsh-fac3086d9782e73dcaf1aa65fd36a0b63a374719.zip
_wanted now tests both tags and labels; change places where _wanted was called without a command; allow multiple patterns per string in file-patterns; update _next_tags to work with labels (10632)
Diffstat (limited to 'Completion/Base/_first')
-rw-r--r--Completion/Base/_first25
1 files changed, 16 insertions, 9 deletions
diff --git a/Completion/Base/_first b/Completion/Base/_first
index d9e7ee82c..93602f307 100644
--- a/Completion/Base/_first
+++ b/Completion/Base/_first
@@ -35,28 +35,35 @@
 # and hitting TAB.
 #
 #     if [[ "$PREFIX" = *,, ]]; then
-#       local max i=1
+#       local max i=1 expl opt
 #     
 #       PREFIX="$PREFIX[1,-2]"
 #       # If a numeric prefix is given, we use it as the number of
 #       # lines (multiplied by ten below) in the history to search.
-#       if [[ NUMERIC -gt 1 ]]; then
+#       if [[ ${NUMERIC:-1} -gt 1 ]]; then
 #         max=$NUMERIC
-#         NUMERIC=1
+#         unset NUMERIC
 #       else
 #         # The default is to search the last 100 lines.
 #         max=10
 #       fi
-#       # We first search in the last ten lines, then in the last
-#       # twenty lines, and so on...
+#       # We first search in the last ten words, then in the last
+#       # twenty words, and so on...
 #       while [[ i -le max ]]; do
-#         if compgen -X "%Bhistory ($n):%b" -Q -H $(( i*10 )) ''; then
+#         if zstyle -t ":completion:${curcontext}:history-words" sort; then
+#           opt=-J
+#         else
+#           opt=-V
+#         fi
+#         if _wanted "$opt" history-words expl "history ($n)" \
+#                compadd "$expl[@]" -Q - \
+#                    "${(@)${(@)historywords:#[\$'\"]*}[1,i*10]}"; then
 #           # We have found at least one matching word, so we switch
 #           # on menu-completion and make sure that no other
-#           # completion function is called by setting _comp_skip.
+#           # completion function is called by setting _compskip.
 #           compstate[insert]=menu
-#           _comp_skip=1
-#           return
+#           _compskip=all
+#           return 0
 #         fi
 #         (( i++ ))
 #       done