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

Re: [PATCH] Don't complete dirs as suffix aliases



> On 11 May 2022 at 11:44 Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
> On Wed, May 11, 2022 at 11:03 AM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> >
> > On 5/11/22, Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
> > > ...because suffix aliases don't work with directories.
> >
> > In what sense do they not work?
>
> % zsh -f
> % alias -s marlon=echo
> % mkdir hello.marlon
> % hello.marlon
> zsh: command not found: hello.marlon

So I think you need to change the line you added to

[[ -o autocd ]] || pat+='(#q^/)'

Not a particularly obvious use case, but presumably best not to break it.

pws




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