Because using feh was not minimal enough (it did too many things too well!) I decided to use sxiv. But the one thing I did miss was being able to use feh to open remote images, e.g:

feh http://feh.finalrewind.org/logo.png

because I find that particularly handy to view images from Twitter when using TTYtter. So I added a little function into my .mkshrc to emulate this behaviour:

function sxiveh {
	curl -o sxivimage -s "$@" ; sxiv sxivimage ; rm sxivimage
}	

This sticks more closely to the unix philosophy of doing one thing well and then gluing those things together, but that really isn’t why I’ve done this. There isn’t actually any reason why I’ve done this. Does there have to be?

I wonder if I could make this a bit more clever and just override the built-in function with a wrapper, that only uses curl to download if the filename contains http, etc?

[EDIT: 2013-12-26] Ah, yes, that’s better:

function sxiveh {
	case $@ in
		http*://*) curl -o sxivimage -s "$@" ; sxiv sxivimage ; rm sxivimage;;
		*) sxiv $@;;
	esac
}