【问题标题】:emacs tramp how to avoid bash_profileemacs tramp 如何避免 bash_profile
【发布时间】:2012-05-29 13:42:23
【问题描述】:

每次我访问远程机器中的文件系统并执行命令(例如 grep)时,带有该命令结果的 emacs 缓冲区也包含我的详细 .bash_profile 输出。

如何禁用此行为?即如何让远程命令只加载.bashrc? (在流浪汉中,我的远程方法是 ssh)

【问题讨论】:

标签: emacs tramp


【解决方案1】:

我建议将 .bash_profile 中输出文本的所有内容移到文件末尾,并将以下内容放在这些命令之前:

If [ "$TERM" == "dumb" ]; then
     return
fi

应该这样做。重读http://www.gnu.org/software/tramp/#Remote-shell-setup 了解更多信息。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-12-20
    • 2010-10-17
    • 2012-05-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-22
    • 1970-01-01
    相关资源
    最近更新 更多