zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: small completion function fixes
Date: Mon, 1 Nov 1999 09:02:01 +0100 (MET)	[thread overview]
Message-ID: <199911010802.JAA28737@beta.informatik.hu-berlin.de> (raw)


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


                 reply	other threads:[~1999-11-01  8:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199911010802.JAA28737@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).