zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: special-dirs
@ 2000-01-18  9:53 Sven Wischnowsky
  2000-01-18 10:17 ` Andy Spiegl
  2000-01-18 10:33 ` Error building zsh under FreeBSD Ollivier Robert
  0 siblings, 2 replies; 4+ messages in thread
From: Sven Wischnowsky @ 2000-01-18  9:53 UTC (permalink / raw)
  To: zsh-workers; +Cc: Andy Spiegl


After several mails from Andy Spiegel I finally realised that (and
how) the special-dirs style wasn't tested correctly. Especially with
GLOB_DOTS set. This should fix it.

Andy: does it work now?

Bye
 Sven

diff -ru ../z.old/Completion/Core/_path_files Completion/Core/_path_files
--- ../z.old/Completion/Core/_path_files	Mon Jan 17 13:54:45 2000
+++ Completion/Core/_path_files	Tue Jan 18 09:17:23 2000
@@ -264,27 +264,26 @@
 
     if [[ "$tpre$tsuf" = */* ]]; then
       tmp2=( ${^tmp1}*(-/) )
-      if [[ ! -o globdots && "$PREFIX" = .* ]]; then
-        tmp2=( "$tmp2[@]" ${^tmp1}.*(-/) )
-	if zstyle -s ":completion${curcontext}:paths" special-dirs atmp; then
-	  if [[ "$atmp" = (yes|true|1|on) ]]; then
-	    tmp2=( "$tmp2[@]" . .. )
-	  elif [[ "$atmp" = .. ]]; then
-	    tmp2=( "$tmp2[@]" .. )
-          fi
+      [[ ! -o globdots && "$PREFIX" = .* ]] &&
+          tmp2=( "$tmp2[@]" ${^tmp1}.*(-/) )
+      if [[ -o globdots || "$PREFIX" = .* ]] &&
+         zstyle -s ":completion${curcontext}:paths" special-dirs atmp; then
+	if [[ "$atmp" = (yes|true|1|on) ]]; then
+	  tmp2=( "$tmp2[@]" . .. )
+	elif [[ "$atmp" = .. ]]; then
+	  tmp2=( "$tmp2[@]" .. )
         fi
       fi
     else
       tmp2=( ${^tmp1}${^~pats} )
-      if [[ ! -o globdots && "$PREFIX" = .* ]]; then
-        tmp2=( "$tmp2[@]" ${^tmp1}.${^~pats} )
-        if [[ "$sopt" = */* ]] &&
-	   zstyle -s ":completion${curcontext}:paths" special-dirs atmp; then
-	  if [[ "$atmp" = (yes|true|1|on) ]]; then
-	    tmp2=( "$tmp2[@]" . .. )
-	  elif [[ "$atmp" = .. ]]; then
-	    tmp2=( "$tmp2[@]" .. )
-          fi
+      [[ ! -o globdots && "$PREFIX" = .* ]] &&
+          tmp2=( "$tmp2[@]" ${^tmp1}.${^~pats} )
+      if [[ "$sopt" = *[/f]* && ( -o globdots || "$PREFIX" = .* ) ]] &&
+	 zstyle -s ":completion${curcontext}:paths" special-dirs atmp; then
+	if [[ "$atmp" = (yes|true|1|on) ]]; then
+	  tmp2=( "$tmp2[@]" . .. )
+	elif [[ "$atmp" = .. ]]; then
+	  tmp2=( "$tmp2[@]" .. )
         fi
       fi
     fi

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-01-18 10:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-18  9:53 PATCH: special-dirs Sven Wischnowsky
2000-01-18 10:17 ` Andy Spiegl
2000-01-18 10:33 ` Error building zsh under FreeBSD Ollivier Robert
2000-01-18 10:43   ` Zefram

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).