有没有办法定义别名,以便shell-command
可以识别它们? shell
识别.emacs.d / init_bash.sh中定义的那些;是否有可能让shell-command
意识到这些?
答案 0 :(得分:2)
在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)
nil
之后的shell-file-name
表示emacs不会向进程发送输入文件。因此,您应该检查shell-file-name
的值以确定它是否是读取隐式.rc文件的进程。