今天发现了一个小陷阱,emacs中的eshell和其他shell在解释backticks(“`”)符号上完全不同。上网搜了一下,终于发现了答案。
http://www.emacswiki.org/emacs/EshellBackticks
There are no `backticks` per se in eshell. Here is how backticks work in other shells: The commands enclosed in backticks are executed, and their output replaces the commands in backticks. Then the surrounding commands are executed.
eshell:
不解析backticks符号。
other shells:
其他shell的解析过程先把``引起来的语句执行完毕,该输出替换掉``及引在其中的语句。接着执行``外面的语句。