From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: compset -P '/'
Date: Mon, 24 Jan 2000 11:35:20 +0100 (MET) [thread overview]
Message-ID: <200001241035.LAA10587@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Tanaka Akira's message of 23 Jan 2000 20:48:49 +0900
Tanaka Akira wrote:
> I found a problem with completion.
>
> Z(2):akr@is27e1u11% Src/zsh -f
> is27e1u11% bindkey -e; autoload -U compinit; compinit -D; compdef _tst tst
> is27e1u11% rm -rf z
> is27e1u11% mkdir z z/y
> is27e1u11% touch z/a
> is27e1u11% _tst () {
> function> compset -P '/'
> function> _path_files -g '*(^/)'
> function> _path_files -g '*(/)'
> function> }
> is27e1u11% tst /z/<TAB>
>
> ->
>
> is27e1u11% tst /
>
> zsh removes `z/' and the cursor is places on retained `/'.
> But it should complete the file `a' and the directory `y'.
It got confused about the match specs to use... the test the patch
removes only made sense in the compctl code.
> If the prefix is a colon rather than a slash, it works well.
>
> is27e1u11% _tst () {
> compset -P ':'
> _path_files -g '*(^/)'
> _path_files -g '*(/)'
> }
> is27e1u11% tst :z/<TAB>
> a y/
Because it didn't have a match spec comparable to `r:|/=*'.
Bye
Sven
diff -ru ../z.old/Src/Zle/compcore.c Src/Zle/compcore.c
--- ../z.old/Src/Zle/compcore.c Mon Jan 24 10:55:00 2000
+++ Src/Zle/compcore.c Mon Jan 24 11:32:21 2000
@@ -1603,8 +1603,7 @@
mst.matcher = dat->match;
mstack = &mst;
- if (!mnum)
- add_bmatchers(dat->match);
+ add_bmatchers(dat->match);
addlinknode(matchers, dat->match);
dat->match->refc++;
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2000-01-24 10:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-01-24 10:35 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-01-23 11:48 Tanaka Akira
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=200001241035.LAA10587@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).