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

Re: _pick_variant



On Thu, 12 Nov 2020 10:35:05 -0800 Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Thu, Nov 12, 2020 at 9:41 AM Thomas Lauer <thomas.lauer@xxxxxxxxxx>
> wrote:
> 
> >
> > This works as expected. However, if I rename it to md5() { ... }, zsh
> > hangs when I type
> > md5 a<tab> to expand a filename.
> >
> 
> Zsh is invoking the completion for the system default "md5" command
> (sometimes found as /sbin/md5).  That completion attempts to run "md5
> --version" to find out whether it is completing for GNU md5 or some other
> variant.

There's no md5 command anywhere on my system. I have md5{sum,pass} and that's it.

> Your function doesn't handle that, and invokes xclip in the
> background, which hangs.

Well, the quick solution is to change the name, as I did. However, when you say my "function doesn't handle that" this seems to imply that there's a way it could handle that situation. How?

And THX for the response.

-- 
Tom




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