【发布时间】:2010-09-05 19:27:01
【问题描述】:
有没有办法定义别名以便shell-command 可以识别它们? shell 识别 .emacs.d/init_bash.sh 中定义的那些;是否可以让shell-command 也知道这些?
【问题讨论】:
有没有办法定义别名以便shell-command 可以识别它们? shell 识别 .emacs.d/init_bash.sh 中定义的那些;是否可以让shell-command 也知道这些?
【问题讨论】:
在simple.el 中读入shell-command 代码:
;; We do not use -f for csh; we will not support broken use of
;; .cshrcs. Even the BSD csh manual says to use
;; "if ($?prompt) exit" before things which are not useful
;; non-interactively. Besides, if someone wants their other
;; aliases for shell commands then they can still have them.
(call-process shell-file-name nil
(if error-file
(list t error-file)
t)
nil shell-command-switch command)
shell-file-name 后面的nil 表示 emacs 不向进程发送输入文件。因此,您应该检查shell-file-name 的值以确定它是否是读取隐式.rc 文件的进程。
【讨论】: