2017-08-13 27 views
0

我在我的.bash_profile代碼:使用的.bash_profile和.bashrc中作爲一個

1 [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"                       
    2                                       
    3 export NVM_DIR="$HOME/.nvm"                                
    4 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm                       
    5 [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion 

而在我的.bashrc如下:

1 # Add RVM to PATH for scripting. Make sure this is the last PATH variable change.                   
    2 export PATH="$PATH:$HOME/.rvm/bin" 

是否有辦法避免一個的文件?我的意思是,只有兩者兼而有之?

謝謝。

回答

2

只需將以下代碼放在.bash_profile文件中。基本上在.bash_profile中輸入.bashrc文件。

source .bashrc

相關問題