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

_pick_variant



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. :-/




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