【发布时间】:2013-08-20 10:14:40
【问题描述】:
我在 emacs 中使用 eshell。
在 bash 中,当我执行时:
ls test
^ls^ll^
它再次执行最后一条命令,将 ls 更改为 ll,如下所示:
ll test
我怎样才能在 eshell 中做到这一点? 当我这样做时:
ls test
^ls^ll^
或:
!!:s/ls/ll/
eshell 报错:
Wrong type argument: stringp, 108
怎么了?谢谢。
【问题讨论】:
-
我认为这是 eshell 中的错误。 OP 描述的行为与我使用 vanilla Emacs 24.3.1 的行为相同。我调查了一下,但即使在
(setq eshell-handle-errors nil)、(setq debug-on-error t)等之后,我也无法获得正确的回溯。有人有任何见解吗? -
eshell 文档历来很少,但似乎已经编写了 eshell 以提供上述 bash 行为(参见函数
eshell-history-reference)。像 Mastering Eshell 这样的文档说 eshell 快速替换“似乎有问题”(2010 年 12 月)。