我的.emacs中有以下内容:
(require 'tramp) (add-to-list 'tramp-remote-path "/some/path") (add-to-list 'tramp-remote-path 'tramp-default-remote-path)
所以当我使用tramp over ssh打开文件时,我希望我PATH
能包含/some/path
.相反,运行M-! echo $PATH
返回
/bin:/usr/bin:/usr/sbin:/usr/local/bin
即使我设置export PATH=/hwdisks/data/modules/pkg/git/1.8.4.1/bin/git:$PATH
的.bashrc
或.profile
,PATH
设置不正确.
在tramp日志中*debug tramp/ssh remotehost*
,我可以看到tramp明确设置PATH
:
12:28:34.202135 tramp-send-command (6) # PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin; export PATH
如果我包括echo "in .bashrc"
在我的.bashrc
,它出现在tramp日志中,所以我知道tramp正在阅读它.
如何让流浪汉使用正确PATH
?
Emacs版本:24.2.1
Tramp版本:2.2.3-24.1