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

How does jenv work with fish shell? #126

Closed
haifzhan opened this issue Dec 7, 2015 · 3 comments
Closed

How does jenv work with fish shell? #126

haifzhan opened this issue Dec 7, 2015 · 3 comments

Comments

@haifzhan
Copy link

haifzhan commented Dec 7, 2015

I am using jenv with fish shell. I followed the jenv instructions on Github, unfortunately it seems not working with fish shell.

Please help, it does work even I invoke 'jenv global oracel64-1.7.0.79', the version is still java8.

$> jenv versions Mon 7 Dec 2015 14:22:00 MST
system
1.7

  • 1.7.0.79 (set by /Users/hzhang/work/battleground/.java-version)
    1.8
    1.8.0.60
    oracle64-1.7.0.79
    oracle64-1.8.0.60
    $> jenv doctor Mon 7 Dec 2015 14:22:07 MST
    [OK] No JAVA_HOME set
    [ERROR] Java binary in path is not in the jenv shims.
    [ERROR] Please check your path, or try using /path/to/java/home is not a valid path to java installation.
    PATH : /Users/haifzhan/.jenv/libexec:/Users/hzhang/.jenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin
    [ERROR] Jenv is not loaded in your fish
    [ERROR] To fix : cat eval "$(jenv init -)" >> your profile
@stirp
Copy link

stirp commented Dec 17, 2015

Did you tried to put the script file jenv.fish(https://github.com/gcuisinier/jenv/blob/master/fish/jenv.fish) into ~/.oh-my-fish/functions/ if you are using oh-my-fish?
Then if your fish has function export (executing "functions | grep export" that get "export"), you could simply add "export JENV_LOADED=1" into jenv.fish.
If your fish doesn't have the function export, put export.fish (https://github.com/gcuisinier/jenv/blob/master/fish/export.fish) into your functions folder, then add "export JENV_LOADED=1" into your jenv.fish.

@haifzhan
Copy link
Author

@stirp Thanks. I figured out there's a typo for my function folder name. jenv works after I correct the typo.

@Puneet-Patwari
Copy link

@stirp Thanks. works like a charm. Wasted an hour trying to solve it.

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

3 participants