diff --git a/src/state/shellscripts/env_hook.csh b/src/state/shellscripts/env_hook.csh index 3b02429c6a5..8a2c6525f95 100644 --- a/src/state/shellscripts/env_hook.csh +++ b/src/state/shellscripts/env_hook.csh @@ -1 +1 @@ -alias precmd 'eval `opam env --shell=csh --readonly`' +alias precmd 'eval `opam env --shell=csh`' diff --git a/src/state/shellscripts/env_hook.fish b/src/state/shellscripts/env_hook.fish index 971be3a4ed7..39fd7cd19f4 100644 --- a/src/state/shellscripts/env_hook.fish +++ b/src/state/shellscripts/env_hook.fish @@ -1,3 +1,3 @@ function __opam_env_export_eval --on-event fish_prompt - eval (opam env --shell=fish --readonly 2> /dev/null) + eval (opam env --shell=fish 2> /dev/null) end diff --git a/src/state/shellscripts/env_hook.sh b/src/state/shellscripts/env_hook.sh index 278569eaace..881524bdf5b 100644 --- a/src/state/shellscripts/env_hook.sh +++ b/src/state/shellscripts/env_hook.sh @@ -1,6 +1,6 @@ _opam_env_hook() { local previous_exit_status=$?; - eval $(opam env --shell=bash --readonly 2> /dev/null <&- ); + eval $(opam env --shell=bash 2> /dev/null <&- ); return $previous_exit_status; }; if ! [[ "$PROMPT_COMMAND" =~ _opam_env_hook ]]; then diff --git a/src/state/shellscripts/env_hook.zsh b/src/state/shellscripts/env_hook.zsh index d9e6a9ab8fc..cb5cba20c4e 100644 --- a/src/state/shellscripts/env_hook.zsh +++ b/src/state/shellscripts/env_hook.zsh @@ -1,5 +1,5 @@ _opam_env_hook() { - eval $(opam env --shell=zsh --readonly 2> /dev/null <&-); + eval $(opam env --shell=zsh 2> /dev/null <&-); } typeset -ag precmd_functions; if [[ -z ${precmd_functions[(r)_opam_env_hook]} ]]; then