Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #203 from cago/master

Add shell script for auto eval after opam switch command (Benoit Vaugon's patch)
  • Loading branch information...
commit 0a92666e5d1736deed67d5cf3a72e46ebc70f390 2 parents 71a2de5 + 86df8ec
@samoht samoht authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 shell/opam_auto_eval.sh
View
8 shell/opam_auto_eval.sh
@@ -0,0 +1,8 @@
+OPAM_EXECUTABLE_PATH=$(which opam) || return 1
+function opam () {
+ "$OPAM_EXECUTABLE_PATH" "$@"
+ if [ -n "$1" ] && [ "$1" = "switch" ]
+ then
+ eval $("$OPAM_EXECUTABLE_PATH" config -env)
+ fi
+}
Please sign in to comment.
Something went wrong with that request. Please try again.