From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Cc: Andy Spiegl <Andy@spiegl.de>
Subject: PATCH: special-dirs
Date: Tue, 18 Jan 2000 10:53:46 +0100 (MET) [thread overview]
Message-ID: <200001180953.KAA25795@beta.informatik.hu-berlin.de> (raw)
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
next reply other threads:[~2000-01-18 10:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-01-18 9:53 Sven Wischnowsky [this message]
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
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=200001180953.KAA25795@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=Andy@spiegl.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).