对于特定的C-d情况,您可以使用绑定到eshell-send-eof-to-process的C-cC-d。否则,使用C-q进行引用插入,即使在Emacs中它具有键绑定,也会强制将后面的字符插入缓冲区。
eshell-send-eof-to-process