Add a "shell" command similar to the existing "global" and "local"
commands, which sets the version in an environment variable instead of
writing it to a file. This was inspired by the similar functionality in
rbenv.
It works by adding a wrapper function for the asdf command. It forwards
to a "sh-shell" command that returns the exports as shell code which is
then evaled by the wrapper. This is a little gross, but we need to run
the code in the shell context in order to set variables.
Resolves#378
fish_user_paths variable is prepended to $PATH automatically. Some people set fish_user_paths, while others set PATH.
It will be better to test if fish_user_paths is set, and prepend it if it is, while just prepending to PATH otherwise.
- add `bin` and `shims` directories from asdf installation to PATH
- add `shims` directory from `$ASDF_DATA_DIR` (default `$HOME/.asdf`) to
PATH
- don't create directories in init script (directories are only added to
PATH if they exist, besides there is no warning when a directory does
not exist (perhaps it was a bug that was fixed))
This brings the fish snippet closer to the one for sh.