(defun eshell/imgcat (&rest args)
"Display image files."
(unless args (error "Usage: imgcat FILE ..."))
(dolist (img (eshell-flatten-list args))
(eshell-printn
(propertize " " 'display (create-image img)))))
可惜的是 Eshell 命令(就像上面用 Lisp 写的 imgcat
)不支持 |
(Pipe),没法直接
$ curl http://orgmode.org/img/org-mode-unicorn.svg | imgcat