shell - Emacs ansi-term 作为登录 shell

标签 shell emacs rvm

我正在使用 Emacs Live。如何配置 emacs ansi-term 以允许登录 shell?当我尝试切换 rvm gemset 时,我收到以下消息:

RVM is not a function, selecting rubies with 'rvm use ...' will not work.
    You need to change your terminal emulator preferences to allow login shell.
    Sometimes it is required to use `/bin/bash --login` as the command.
    Please visit https://rvm.io/integration/gnome-terminal/ for a example.

谢谢!

最佳答案

我发现如果我添加以下行,Emacs 会将 RVM 视为一个函数并停止提示。

# Load RVM into a shell session *as a function*
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" 

关于shell - Emacs ansi-term 作为登录 shell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21739575/

相关文章:

emacs rgrep 在 find 命令中失败 (Windows 7)

emacs - 不要截断 emacs 包列表中的包名称。

ruby-on-rails - 避免 "bundle install"使用预编译的 gem

shell - 如何在没有命令行参数的情况下将参数传递给子 shell(通过执行,而不是源代码)?

linux - 如何验证 shell 脚本中的参数数量(强制和可选)?

emacs - 在 emacs 中突出显示行

sqlite3-ruby 无法在 rvm 1.8.7 上运行

shell - 如何列出所有 zsh 自动完成?

linux - 使用 sed 在包含两个特定字符串的行中添加字符

ruby-on-rails - 在 Rails 应用程序中升级 Ruby 版本和 gemsets 的安全方法