Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: small completion function fixes
- X-seq: zsh-workers 8479
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: small completion function fixes
- Date: Mon, 1 Nov 1999 09:02:01 +0100 (MET)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Two of them:
- The suggested (commented-out) history code in `_first' wasn't fully
up-to-date.
- `_path_files' didn't work for files starting with a dot (GLOB_DOTS
wasn't used).
Bye
Sven
diff -u -r oldcompletion/Base/_first Completion/Base/_first
--- oldcompletion/Base/_first Fri Oct 29 21:15:44 1999
+++ Completion/Base/_first Fri Oct 29 21:04:46 1999
@@ -47,15 +47,16 @@
# # 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 [[ -n "$compconfig[history_sort]" ]]; then
# _description expl "history ($n)"
# else
# _description -V expl "history ($n)"
# fi
-# if compadd "$expl[@]" -Q - "${(@)historywords:#[\$'\"]*}"; then
+# if 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 _compskip.
diff -u -r oldcompletion/Core/_path_files Completion/Core/_path_files
--- oldcompletion/Core/_path_files Fri Oct 29 21:15:45 1999
+++ Completion/Core/_path_files Fri Oct 29 21:13:08 1999
@@ -10,7 +10,7 @@
typeset -U prepaths exppaths
-setopt localoptions nullglob rcexpandparam
+setopt localoptions nullglob rcexpandparam globdots
unsetopt markdirs globsubst shwordsplit nounset
local sopt='-' gopt='' opt
@@ -210,7 +210,7 @@
# Get the matching files by globbing.
if [[ "$tpre$tsuf" = */* ]]; then
- tmp1=( ${^tmp1}*(-D/) )
+ tmp1=( ${^tmp1}*(-/) )
else
tmp1=( ${^tmp1}${^~pats} )
fi
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author