Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tab completion of paths in CDPATH, fixes #1374 #1375

Closed
wants to merge 1 commit into from
Closed

Fix tab completion of paths in CDPATH, fixes #1374 #1375

wants to merge 1 commit into from

Conversation

joshingly
Copy link

@mpapis
Copy link
Member

mpapis commented Dec 7, 2012

I thought it was unset to fix something, but it should be also resotred after out of rvm, so the completion which is done in shell should work - so the bug might be not that we unset it - but rather that we do not restore it properly

@richo
Copy link
Member

richo commented Dec 7, 2012

When you say tab completion is broken, is actually using CDPATH also broken?

AFAIK cdpath is restored properly.

@mpapis
Copy link
Member

mpapis commented Dec 7, 2012

are you using rvm_cd_complete_flag=1?

@joshingly
Copy link
Author

rvm_cd_complete_flag is set and the issue is still present. CDPATH appears to be restored properly (echoing CDPATH returns the correct value), using CDPATH (without tab completion) still works.

richo added a commit that referenced this pull request Dec 9, 2012
Should avoid breaking tab completion in zsh.

Update #1375
@richo
Copy link
Member

richo commented Dec 9, 2012

can you rvm get head and let me know if this is still an issue?

@mpapis
Copy link
Member

mpapis commented Dec 9, 2012

I was thinking more of ${CDPATH:-$rvm_stored_cdpath} in here https://github.com/wayneeseguin/rvm/blob/master/scripts/cd#L81-L86

@joshingly
Copy link
Author

Did an rvm get head and everything is working now... thanks!

@mpapis
Copy link
Member

mpapis commented Dec 9, 2012

@Antonishen so can we close both tickets?

@joshingly
Copy link
Author

@mpapis done and done! thanks for your help!

@joshingly joshingly closed this Dec 9, 2012
@ghost ghost assigned richo Dec 9, 2012
@richo
Copy link
Member

richo commented Dec 9, 2012

You're right though @mpapis I hadn't seen that we exported a cd hook for bash.

My fix just relies on the vague quirks in bash/zsh when you unset magic variables, for example unset RANDOM breaks random forever

@mpapis
Copy link
Member

mpapis commented Dec 9, 2012

ah ok, so I think we should replace all $CDPATH with ${rvm_stored_cdpath:-$CDPATH} in here -> https://github.com/wayneeseguin/rvm/blob/master/scripts/cd#L81-L86

@mtylty
Copy link

mtylty commented Dec 13, 2012

I just went with rvm get head and the issue is fixed at first (when logging into a new terminal).

As soon as I cd into a repo with a proper .rvmrc (setting a per project gemset), my $CDPATH has changed to just .

@mpapis
Copy link
Member

mpapis commented Dec 13, 2012

my guess is we do not initialize rvm_stored_cdpath on every call, it's set only when rvm is loaded, @mtylty please open a new ticket (I can not reopen pull request)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants