scmbreeze / scm_breeze

Adds numbered shortcuts to the output git status, and much more
https://madebynathan.com/2011/10/19/git-shortcuts-like-youve-never-seen-before/
MIT License
2.82k stars 192 forks source link

SCM Breeze must be loaded after RVM, otherwise there will be a conflict when RVM wraps the 'cd' command. #248

Open ScottZg opened 6 years ago

ScottZg commented 6 years ago

SCM Breeze must be loaded after RVM, otherwise there will be a conflict when RVM wraps the 'cd' command. Please move the line that loads SCM Breeze to the bottom of your ~/.bashrc SCM Breeze must be loaded after RVM, otherwise there will be a conflict when RVM wraps the 'cd' command. Please move the line that loads SCM Breeze to the bottom of your ~/.bashrc

when i run my item,there is a error show as below,i move the line that loads SCM Breeze to the bottom of my ~/.bashrc ,it still have this error

ScottZg commented 6 years ago

my bashrc file is blow:

export PATH="$PATH:$HOME/.rvm/bin"

[ -s "$HOME/.scm_breeze/scm_breeze.sh" ] && source "$HOME/.scm_breeze/scm_breeze.sh"

omnikron commented 6 years ago

@ScottZg what is the error?

ghthor commented 6 years ago

Does the conflict go away when you remove cd from the commands wrapped by scm_breeze?

ScottZg commented 6 years ago

@omnikron snip20180516_1

zhangferry commented 6 years ago

I have encountered the same problem,how can I solve it?

XAmateur commented 6 years ago

@ghthor how can I remove cd from the commands wrapped by scm_breeze? Cloud u pls give us some tips?

ghthor commented 6 years ago

You need to edit your git.scmbrc settings file. See: https://github.com/scmbreeze/scm_breeze/blob/master/git.scmbrc.example#L124

ryanhinton commented 4 years ago

It seems as though this problem is still existing over a year later. I just ran into this error and the weird thing is that I commented out the RVM lines in the .bashrc file, the SCM Breeze lines have been moved to the bottom, I exited and started up the terminal and the error still shows up, which is perplexing. Is there another place in which this error is happening maybe?

ghthor commented 4 years ago

That is perplexing. Perhaps the RVM lines are still lingering in shell configuration because exiting and starting up the terminal isn't completely re-applying the bashrc somehow?

@ryanhinton What OS are you on?

ghthor commented 4 years ago

@ryanhinton Ok, I figured this out. The RVM check complains if $HOME/.rvm exists but the type rvm doesn't exist and assumes that means that the RVM hasn't been initialized yet.

So if you remove the RVM lines and $HOME/.rvm exists this error message will print. The solution is to make sure the ordering of RVM => SCM Breeze is correct, or to remove the $HOME/.rvm directory.

ghthor commented 4 years ago

@ScottZg @ryanhinton Perhaps you need to complete the RVM installation guide, such that your .bashrc contains the following?

source $HOME/.rvm/scripts/rvm

...

[ -s "$HOME/.scm_breeze/scm_breeze.sh" ] && source "$HOME/.scm_breeze/scm_breeze.sh"

That might fulfill the contract expected by the RVM Check that states when $HOME/.rvm exists some type rvm will also exist in the shell environment.

ryanhinton commented 4 years ago

I am no longer using RVM and I am currently using ASDF. FWIW, I am also no longer using Windows and instead using Ubuntu for my work environment. No issues, so far :-)