Conversation
|
I am not sure to understand when do these scripts are actually called. Is this for internal opam commands? Or is it for every user commands? In the later case maybe we should have a way to disable that? |
|
These scripts are generated at This script, if it's a terminal, set evaluation of On current setup, only |
|
I think it's worth thinking a bit to understand the consequences of that change (note: I think that's generally a good idea, but there are maybe some corner cases where this doesn't work very well). Previously, the user had strong control about which switch was used (by doing Moreover, does it mean that we are creating a new shell on every command? Note: I am being cautious because these things have caused a lot of confusion to users in the past; changing this seems to go in the right direction but we need to be careful :-) |
Indeed, you still retain such control but would now need to set
It respects the intended semantics of local switches much better, and indeed I have heard of quite a few users doing similar shell tricks manually. So this should give these users a safer and supported alternative. Let's not forget that the lack of sync between opam and the shell, and need to call ¹ A way to do this could be to check if |
|
I am wondering wether it would be a good idea to re-enable making See #3143 for context. In this case, there can be no point in the command if not using One small glitch is that, if you issue And no, this shouldn't spawn any subshells, it's just an |
Yes, just a |
|
It is now disabled by default, at |
This PR contains an update of shell configuration scripts to have always opam variables set (evaluation at each command). It was inspired from direnv (thanks @samoht). Available for all opam handled shells.
For
bash, I kept sourcing scripts on profile config files (cf. #1447), assuming that profile files are sourced in.bashrc. Added a message for the user in this case.