Eshell 的命令没法读取 STDIN

Eshell 可以自定义命令(实际所有 Emacs 函数都能调用),但是对于命令行程序至关重要的 STDIN,Eshell 不支持。中午把 lolcat (给文字添加颜色的命令行工具)移植到了 Emacs1,发现没办法 $ fortune | cowsay | lolcat


1 GitHub - xuchunyang/lolcat.el: Rainbows and unicorns in Emacs Lisp!

这个彩虹的文字,对于单个字母,它是某一种颜色还是包含几种颜色?

一个字母只有一个颜色。

所以有點好奇 eshell/cat 是怎么实現的,然後:

If in a pipeline, or the file is not a regular file, directory or symlink, then revert to the system’s definition of cat.

你也許可以试试 warp 在系統的 cat 上?