zsh-users
 help / color / mirror / code / Atom feed
From: Thomas Lauer <thomas.lauer@virgin.net>
To: zsh-users@zsh.org
Subject: _pick_variant
Date: Fri, 13 Nov 2020 17:41:24 +0000	[thread overview]
Message-ID: <20201113174124.cb440e381388179852e48c62@virgin.net> (raw)

I tend to try and solve problems on my own but this one has really left me puzzled.

Consider this simple function in my zsh init:
mde5() {
	local sum=$(md5sum $1)
	echo $sum
	echo $sum md5 | cut -d " " -f 1,4 | xclip -i -selection clipboard
}

This works as expected. However, if I rename it to md5() { ... }, zsh hangs when I type
md5 a<tab> to expand a filename. Ctrl+C shows this message:
" illed by signal in _pick_variant after 1s" (yes the first character is a blank).

Hm... after going through a few permutations I found out that the hang disappears if I remove the final xclip command, ie:
md5() {
	local sum=$(md5sum $1)
	echo $sum
	echo $sum md5 | cut -d " " -f 1,4
}

No hangs and I have no idea what's going on. :-/


             reply	other threads:[~2020-11-12 17:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13 17:41 Thomas Lauer [this message]
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   ` _pick_variant Thomas Lauer
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=20201113174124.cb440e381388179852e48c62@virgin.net \
    --to=thomas.lauer@virgin.net \
    --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).