zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: small completion function fixes
@ 1999-11-01  8:02 Sven Wischnowsky
  0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 1999-11-01  8:02 UTC (permalink / raw)
  To: zsh-workers


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@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-11-01  8:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-01  8:02 PATCH: small completion function fixes Sven Wischnowsky

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).