Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Pattern matching with _files vs command line



Hi,

On 2016-09-12 18:18, Bart Schaefer wrote:
> On Sep 12,  7:30am, Marko Myllynen wrote:
> }
> } On 2016-09-10 05:40, Bart Schaefer wrote:
> } > On Sep 9,  8:39am, Marko Myllynen wrote:
> } > }
> } > } _wanted files expl file _files -g '*(-FM)' && ret=0
> } > 
> } >   # People prefer to have directories shown on first try as default.
> } >   # Even if the calling function didn't use -/.
> } > 
> } >   zstyle :completion::complete:foo:: file-patterns '%p:globbed-files'
> } 
> } Thanks, this did the trick!
> } 
> } >   zstyle :completion::complete:foo:: tag-order globbed-files -
> } 
> } This, however, doesn't seem to work: with or without the former this
> } stops completion for foo altogether.
> 
> Yes, that's connected to this:
> 
> } > HOWEVER, you've actually broken things with your glob pattern.  Adding
> } > the (M) flag means that the generated completions end with a "/"
> 
> If you fix the glob pattern to remove the (M) qualifier, then tag-order
> works (at least for me).  If you leave the (M) in there, tag-order is
> broken.

Sorry, should have mentioned that I tested already without (M). Both
with 5.0.2 and latest git master (otherwise I had default zstyle
settings). Since the earlier stanza already solved the issue, not sure
is this worth pursuing further.

Thanks,

-- 
Marko Myllynen



Messages sorted by: Reverse Date, Date, Thread, Author