[JAVA] Introduced anyenv and pasted a symlink so that existing pyenv, rbenv, jenv can also be read

I think that many people use rbenv and pyenv, but as you install each, the content to be written in .bashrc and .zshrc will gradually increase. With anyenv, you only have to write two lines.

.zshrc


export PATH="$HOME/.anyenv/bin:$PATH"
eval "$(anyenv init -)"

It's convenient. This time I will put this.

1. Install anyenv

$ git clone https://github.com/riywo/anyenv ~/.anyenv

Edit .zshrc. If you are using bash, it will be .bashrc or .bash_profile.

.zshrc


export PATH="$HOME/.anyenv/bin:$PATH"
eval "$(anyenv init -)"

#You can comment out what you have written so far ↓

# Ruby Env
#export PATH="$HOME/.rbenv/bin:$PATH"
#eval "$(rbenv init -)"

# Python Env
# export PATH=$PYENV_ROOT/bin:$PATH
# eval "$(pyenv init -)"
# eval "$(pyenv virtualenv-init -)"

# Java Env
#export PATH="$HOME/.jenv/bin:$PATH"
#eval "$(jenv init -)"

Reboot the shell.

$ exec $SHELL -l

I will try if anyenv can be used.

$ anyenv
anyenv
Usage: anyenv <command> [<args>]

Some useful anyenv commands are:
   commands            List all available anyenv commands
   local               Show the local application-specific Any version
   global              Show the global Any version
   install             Install a **env
   uninstall           Uninstall a specific **anv
   version             Show the current Any version and its origin
   versions            List all Any versions available to **env

See `anyenv help <command>' for information on a specific command.
For full documentation, see: https://github.com/riywo/anyenv#readme

Oh, it seems that it can be used already.

2. When you want to use 〇〇env newly

If you want to install a new env system, you can easily enter it with a single command. For example, if you want to include ndenv, do the following:

$ anyenv install ndenv

With this alone, you can use ndenv soon. Convenient~.

$ ndenv
ndenv 0.4.0-4-ga339097
Usage: ndenv <command> [<args>]

Some useful ndenv commands are:
   commands    List all available ndenv commands
   local       Set or show the local application-specific Node version
   global      Set or show the global Node version
   shell       Set or show the shell-specific Node version
   install     Install a Node version using the node-build plugin
   uninstall   Uninstall a specific Node version
   rehash      Rehash ndenv shims (run this after installing executables)
   version     Show the current Node version and its origin
   versions    List all Node versions available to ndenv
   which       Display the full path to an executable
   whence      List all Node versions that contain the given executable

See `ndenv help <command>' for information on a specific command.
For full documentation, see: https://github.com/riywo/ndenv#readme

3. For those who have already used rbenv, pyenv, jenv, etc.

If you already have something you were using, such as pyenv or rbenv, paste it because it will not be read unless you paste a symbolic link.

$ ln -s ~/.rbenv ~/.anyenv/envs/rbenv
$ ln -s ~/.pyenv ~/.anyenv/envs/pyenv
$ ln -s ~/.jenv ~/.anyenv/envs/jenv

It was easy. the end.

I referred to this article. http://qiita.com/luckypool/items/f1e756e9d3e9786ad9ea http://d.hatena.ne.jp/riocampos+tech/20141019/install_anyenv

Recommended Posts

Introduced anyenv and pasted a symlink so that existing pyenv, rbenv, jenv can also be read
Draw a graph that can be moved around with HoloViews and Bokeh
Read the image posted by flask so that it can be handled by opencv