Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Pattern matching with _files vs command line
- X-seq: zsh-workers 39260
- From: Marko Myllynen <myllynen@xxxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: Pattern matching with _files vs command line
- Date: Fri, 9 Sep 2016 08:39:09 +0300
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Red Hat
- Reply-to: Marko Myllynen <myllynen@xxxxxxxxxx>
Hi,
With the file-patterns style unset and the following compdef:
#compdef foo
local expl ret=1
_wanted files expl file _files -g '*(-FM)' && ret=0
return ret
I see the following difference, is this expected or perhaps a bug?
% find
.
./empty
./full
./full/test.txt
./file.txt
% ls -d *(-FM)
full/
% foo <TAB>
empty full full/
% foo empty/
Both the double match for full and empty being offered were
unexpected to me.
Thanks,
--
Marko Myllynen
Messages sorted by:
Reverse Date,
Date,
Thread,
Author