zsh-users
 help / color / mirror / code / Atom feed
From: Thomas Lauer <thomas.lauer@virgin.net>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: _pick_variant
Date: Fri, 13 Nov 2020 09:34:43 +0000	[thread overview]
Message-ID: <20201113093443.afd8d11e641eedb409c2ee37@virgin.net> (raw)
In-Reply-To: <CAH+w=7aD09dOMmUHkWZneSEjp0t7S1eWhJx6sc7LBxWqGmP8Ow@mail.gmail.com>

On Thu, 12 Nov 2020 10:35:05 -0800 Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Thu, Nov 12, 2020 at 9:41 AM Thomas Lauer <thomas.lauer@virgin.net>
> 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


  parent reply	other threads:[~2020-11-13  9:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13 17:41 _pick_variant Thomas Lauer
2020-11-12 18:35 ` _pick_variant Bart Schaefer
2020-11-12 18:40   ` _pick_variant Roman Perepelitsa
2020-11-12 19:07     ` _pick_variant Ray Andrews
2020-11-12 19:17       ` _pick_variant Roman Perepelitsa
2020-11-12 19:20       ` Fwd: _pick_variant JAMES R CUTLER
2020-11-13  9:34   ` Thomas Lauer [this message]
2020-11-13 10:42     ` _pick_variant Roman Perepelitsa
2020-11-13 10:57       ` _pick_variant Thomas Lauer
2020-11-13 11:18       ` _pick_variant Roman Perepelitsa
2020-11-13 22:26       ` _pick_variant Bart Schaefer
2020-11-14  9:56         ` _pick_variant Thomas Lauer
2020-11-14 19:21           ` _pick_variant Bart Schaefer

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=20201113093443.afd8d11e641eedb409c2ee37@virgin.net \
    --to=thomas.lauer@virgin.net \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /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).