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

Switching to git index doesn't mantain $OLDPWD correctly #217

Closed
tjlevine opened this issue Dec 2, 2016 · 1 comment
Closed

Switching to git index doesn't mantain $OLDPWD correctly #217

tjlevine opened this issue Dec 2, 2016 · 1 comment

Comments

@tjlevine
Copy link
Contributor

tjlevine commented Dec 2, 2016

When I switch to my projects directory with the 's' (by default it is aliased to 'c', but it's overwritten to be the old default 's' in my installs, check your git_index_alias), my $OLDPWD is overwritten, so cd - does not work as expected. The easiest way for me to show this is with an example:

tylevine@TYLEVINE-M-X247:~/src/kafka ((0.9.0.1)) $ pwd
/Users/tylevine/src/kafka
tylevine@TYLEVINE-M-X247:~/src/kafka ((0.9.0.1)) $ s
tylevine@TYLEVINE-M-X247:~/src $ echo $OLDPWD
/Users/tylevine/src
tylevine@TYLEVINE-M-X247:~/src $ cd -
/Users/tylevine/src

Here I'm in the kafka subdirectory, I want to change to my projects directory and then go back to the kafka directory, but my $OLDPWD is set to ~/src instead of ~/src/kafka, so I don't actually go anywhere.

@tjlevine
Copy link
Contributor Author

I figured out this is actually caused by an unrelated issue in autoenv: hyperupcall/autoenv#141

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

No branches or pull requests

1 participant