From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-users@sunsite.auc.dk
Subject: Re: two completion questions
Date: Mon, 13 Dec 1999 11:33:12 +0100 (MET) [thread overview]
Message-ID: <199912131033.LAA26141@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Fri, 10 Dec 1999 18:33:37 +0000
Bart Schaefer wrote:
> ...
>
> If you're using the new function-based completion in 3.1.6, it's going to
> require some editing of the _path_files completer. Hey, Sven, do you (or
> any other zsh-workers) remember the rationale for this handling of ".."?
In _path_files it's because globbing never produces . and ..
About compctl: I only vaguely remember lots of discussions about these
two special cases.
Anyway, here's the patch for _path_files, for the latest version.
To tell you the truth: this also fixes two typos that made files not
starting with a dot not be used as possible completions if glob_dots
was unset and the string on the line started with a dot.
Bye
Sven
diff -ru ../z.old/Completion/Core/_path_files Completion/Core/_path_files
--- ../z.old/Completion/Core/_path_files Mon Dec 13 11:24:11 1999
+++ Completion/Core/_path_files Mon Dec 13 11:27:49 1999
@@ -225,11 +225,11 @@
if [[ "$tpre$tsuf" = */* ]]; then
tmp2=( ${^tmp1}*(-/) )
[[ ! -o globdots && "$PREFIX" = .* ]] &&
- tmp2=( "$tmp1[@]" ${^tmp1}.*(-/) )
+ tmp2=( "$tmp2[@]" ${^tmp1}.*(-/) . .. )
else
tmp2=( ${^tmp1}${^~pats} )
[[ ! -o globdots && "$PREFIX" = .* ]] &&
- tmp2=( "$tmp1[@]" ${^tmp1}.${^~pats} )
+ tmp2=( "$tmp2[@]" ${^tmp1}.${^~pats} . .. )
fi
tmp1=( "$tmp2[@]" )
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~1999-12-13 10:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-13 10:33 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-12-14 15:48 Sven Wischnowsky
1999-12-10 17:40 Andy Spiegl
1999-12-10 18:33 ` Bart Schaefer
1999-12-13 10:54 ` Zefram
1999-12-14 15:17 ` Andy Spiegl
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=199912131033.LAA26141@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-users@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).