kerl icon indicating copy to clipboard operation
kerl copied to clipboard

New command: activate

Open eproxus opened this issue 13 years ago • 4 comments

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

eproxus avatar May 31 '11 12:05 eproxus

This would require spawning a new nested shell with an updated environment, and kerl makes no assumption on the shell being used.

evax avatar Jun 01 '11 06:06 evax

I see, I was afraid of that. There's no other shell trickery that can be used to avoid that?

eproxus avatar Jun 01 '11 08:06 eproxus

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?

evax avatar Jun 01 '11 18:06 evax

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.

eproxus avatar Jun 03 '11 09:06 eproxus