How can I get rid of something running on every new terminal session?

后端 未结 7 2061
别跟我提以往
别跟我提以往 2021-02-10 02:27

I am using Lion. I have an error that outputs on every new terminal session:

-bash: __rvm_add_to_path: command not found

It\'s an almost brand

7条回答
  •  梦谈多话
    2021-02-10 03:03

    In Ubuntu 12.04, by default, the /etc/profile.d/rvm.sh will not be loaded when starting a new terminal. So every time, when starting a new termail, cmd as follows must be used to start rvm:

    source /etc/profile.d/rvm.sh
    

    And there are two ways to fix it:

    1. open a new terminal-> right click and select Profiles->Profile Preferences->Title and Command->select "Run command as a login shell".

    2. open a new terminal->run cmd as follows then the /etc/profile.d/rvm.sh will be auto loaded in a new terminal:

      echo '[[ -s "/etc/profile.d/rvm.sh" ]] && . "/etc/profile.d/rvm.sh" # Load RVM function' >> ~/.bashrc

    As some explanation here to say the 1st solution is not a nice one but the 2nd is suggested.

    So in other way round, if you do not want the terminal to run something in a new terminal, you need to check whether the auto load is coursed by the two ways:

    1. check whether the "Run command as a login shell" is selected and unselect it.

    2. open the ~/.bashrc file ,find the lines related loading the function and delete it.

提交回复
热议问题