kerl
kerl copied to clipboard
New command: activate
I want a new command, activate
(or similar name) that activates a given installation:
$ kerl list installations
r14b03_hipe_native /Users/alind/Applications/erlang/r14b03_hipe_native
r13b04_hipe /Users/alind/Applications/erlang/r13b04_hipe
r13b04 /Users/alind/Applications/erlang/r13b04
kerl activate r13b04
would call activate
in the /Users/alind/Applications/erlang/r13b04
folder:
$ kerl activate r13b04
$ kerl active
The current active installation is:
/Users/alind/Applications/erlang/r13b04
This would require spawning a new nested shell with an updated environment, and kerl makes no assumption on the shell being used.
I see, I was afraid of that. There's no other shell trickery that can be used to avoid that?
The only thing I can think of at the moment would be to allow the command only if you specified your favorite shell in you .kerlrc file, something like KERL_SHELL_COMMAND="/bin/bash" or whatever. Would that suit you?
It would create some nested shells, but that would be fine for me. If you want to avoid that you could just use the normal activation command.