Commits

Douglas Creager committed bcc84d4

Allow activate.sh to skip prompt update

This patch updates the activate.sh script to allow you to prevent it
from changing your bash/zsh prompt. To do so, just set the
VIRTUAL_ENV_DISABLE_PROMPT environment variable to any value.

Comments (0)

Files changed (2)

 
 ##file activate.sh
 ACTIVATE_SH = """
-eJytU11P2zAUffevuKQ8AFqJ+srUh6IhgcTKRFgnjSLXTW4aS6ld2U6zgvbfd50PSD+GNI08JLHv
-8fW5557bg4dMWkhljrAsrIM5QmExgVK6DAKrCxMjzKUKRezkWjgM4Cw1eglzYbMz1oONLiAWSmkH
-plAgHSTSYOzyDWMJtqfg5BReGNAjU3iEvoLgmN/dfuGTm/uH76Nb/m30cB3AE3wGl6GqkP7x28ND
-0FcE/lpp4yrg616hLDrYO1TFU8mqb6+u3Ga6yBNI0BHnqigQKoFnm32CMpNxBplYIwj6UCjWy6UP
-u0y4Sq8mFakWizwn3ZyGBd1NMtBfqo1frAQJ2xy15wA/SFtduCbspFo0abaAXgg49rwhzoRaoIWS
-miQS/9qAF5yuNWhXxByTHXEvRxHp2df16md0zSdX99HN3fiAyFVpfbMlz9/aFA0OdSka7DWJgHs9
-igbvtqgJtxRqSBu9Gk/eiB0RLyIyhEBplaB1pvBGwx1uPYgwT6EFHO3c3veh1qHt1b8ZmbqOS2Mw
-p+4rB2thpJjnaLue3r6bsQ7VYcB5Z8l5wBoRuvWwPYuSjLW9m0UHHXJ+eTPm49HXK84vGljX/WxX
-TZ/Mt6GSLJiRuVGJJcJ0K+80mFVKEsdd9by1pMjJ2xa9W2FEO4rst5BxM+baSBKlgSNC5tzqIgzL
-sjx/RkdmXZ+ToUOrU1cKg6HwGUL26prHDq0ZpTxIcDqbPUFdC+YW306fvFPUaX2AWtqxH/ugsf+A
-kf/Pcf/3UW/HnBT5Axjqy2Y=
+eJytVF1v2jAUfc+vuA19aKvRiNdOPFAVqUgtrQhj0kplTHJDLAUb2Q5ZO+2/7zokbQKs0rTmgeDc
+73OObwemqTCQiAxhnRsLS4TcYAyFsCn4RuU6QlgKGfDIii236MNFotUaltykF14HXlQOEZdSWdC5
+BGEhFhojm714Xox1FJydwy8P6BEJPEFXgn/KHu5u2Gw0mX4b3LHHwfTWh2f4CjZFWXq6x33uH3N9
+88CfG6Vt6fj2LZcGLRwElfZEeOW7s5vcpCrPYojRUs/lUMBlDK8m/QJFKqIUUr5F4PQiU6TWa2e2
+KbclXlUqQi3iWUa4WQUrqk0w0L9EaXfYcAK2CjWXAN8JW5XbymyFXFVpWo4OCDh1fUOUcrlCAwWR
+xGP38wIOcCqr0Wyoc4z3wL0ehIRnV+1OP8JbNhtOwtHD+AjI5Whd3YLnbzSFvWMshb0DksjxgKOw
+9yFFlbluYedSW4fj2XtjJ9QXNdIHXyoZo7E6d0LDvd46EGKWQO1wsle960y1QuvSvz0S9c4utMaM
+2JcWtlwLvszQNDXdru15jVb7PmONI2O+V4HQnMc7kCjBuJN3dWh4B4xdj8ZsPLgfMnZVuTXV7+04
+e4VWGLsZhYPruyF7nDzcP073ENonwNWvmSvT+Qu6Eyj5GmHeyjv3FyUBNNqhIDrgVCl4RtfCoBM6
+DOiLJOWuRFRtCKUF4dkIQYTU2s1VEBRFcfmKlrS+vaT7EBiV2IJrDLjLErSF99RocUGpjzY7Xyye
+4X02zAy2s5x9MOj5eyApZE/RTq6ftEw+YZH85xL59wVSLw+C4Q8Om94M
 """.decode("base64").decode("zlib")
 
 ##file activate.bat

virtualenv_support/activate.sh

 PATH="$VIRTUAL_ENV/__BIN_NAME__:$PATH"
 export PATH
 
-_OLD_VIRTUAL_PS1="$PS1"
-if [ "`basename \"$VIRTUAL_ENV\"`" = "__" ] ; then
-    # special case for Aspen magic directories
-    # see http://www.zetadev.com/software/aspen/
-    PS1="[`basename \`dirname \"$VIRTUAL_ENV\"\``] $PS1"
-else
-    PS1="(`basename \"$VIRTUAL_ENV\"`)$PS1"
+if [ -z "$VIRTUAL_ENV_DISABLE_PROMPT" ] ; then
+    _OLD_VIRTUAL_PS1="$PS1"
+    if [ "`basename \"$VIRTUAL_ENV\"`" = "__" ] ; then
+        # special case for Aspen magic directories
+        # see http://www.zetadev.com/software/aspen/
+        PS1="[`basename \`dirname \"$VIRTUAL_ENV\"\``] $PS1"
+    else
+        PS1="(`basename \"$VIRTUAL_ENV\"`)$PS1"
+    fi
+    export PS1
 fi
-export PS1
 
 # This should detect bash and zsh, which have a hash command that must
 # be called to get it to forget past commands.  Without forgetting