With emacs/eshell, the "echo $PATH" shows different paths than that of $PATH environment variable.
And I also checked that eshell doesn't read .bashrc or .profile, and I think that's the reason why the path is different.
正如JérômeRadix指出的那样,PATH取决于我如何启动Aquamcs.
启动时不执行任何安装文件.读取以下文件以定义初始历史记录和最后目录:
~/.eshell/history
~/.eshell/lastdir
Run Code Online (Sandbox Code Playgroud)
在esh-util.el中,第240行:
(defvar eshell-path-env (getenv "PATH")
"Content of $PATH.
It might be different from \(getenv \"PATH\"\), when
`default-directory' points to a remote host.")
Run Code Online (Sandbox Code Playgroud)
它与emacs进程的PATH变量相同.我想你在emacs外面的shell上做一个echo $ PATH来比较.如果emacs和emacs之外的shell不同,那是因为emacs和你的shell没有执行相同的启动脚本.
由于您使用的是 Mac,因此了解 GUI 应用程序(例如未从终端打开时的 Aquamacs)从 获取其环境很重要~/.MacOSX/environment.plist
,因此您可以在那里进行更改。请特别参阅Brian D Foy 的这篇文章,了解自动构建此文件的方法。
归档时间: |
|
查看次数: |
4568 次 |
最近记录: |