aprescott
aprescott
It's been so long that a lot of this has seeped out of my head by now, but I was just re-reading my comment at https://github.com/postmodern/chruby/issues/227#issue-23588607 and thinking about the...
(README update would also happen if `chruby_trap` is implemented of course! Or a wiki entry. Whichever.)
I think this is a variant of #217.
... or, maybe not a variant, but I think #217 is at least blocking this from ever working in the case where it installs a new version.
It looks like using `chpwd` instead of `preexec` would fix this problem, but I don't know zsh enough to recognise any pitfalls with that approach.
Actually that looks like it also fixes #241 and auto-switching would work for zsh subshells: ``` $ ruby -v ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux] $ chruby ruby-1.9.3-p448 ruby-2.0.0-p247 ruby-2.0.0-p353...
@postmodern I'm not sure. That same issue came up at https://github.com/postmodern/chruby/pull/246#commitcomment-5218445 in my (now very-outdated) PR for this fix.
I was going to say no objections, but I just tried this and it's messing with my PS1 for some reason.
Narrowed down the problem: I have a `DEBUG` trap in my `.bashrc` as per #227. So the end of my `auto.sh` is actually: ``` function chruby_trap() { [[ "$BASH_COMMAND" !=...
I suppose there might be a way to call `set +T` and then `set -T` around my `PS1` to bypass it for the `__git_ps1` call?