aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Bobov <anton@bobov.name>2024-11-22 21:10:33 +0500
committerAnton Bobov <anton@bobov.name>2024-11-22 21:10:33 +0500
commit4a48ace97dd581f49ee00a0820001854aee1ff0e (patch)
treee212cc60c56db13ebcbda34f926624d2d185a449
parent83473665905c7d706ae20d21c2e608450433efb5 (diff)
zsh: Allow pip only in virtualenv
-rw-r--r--files/.zsh/rc/S20_environment3
1 files changed, 3 insertions, 0 deletions
diff --git a/files/.zsh/rc/S20_environment b/files/.zsh/rc/S20_environment
index 5cd7594..acd8dd8 100644
--- a/files/.zsh/rc/S20_environment
+++ b/files/.zsh/rc/S20_environment
@@ -51,4 +51,7 @@ export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
# Better `set -x` messages
export PS4='+ ${BASH_SOURCE:-}:${FUNCNAME[0]:-}:L${LINENO:-}: '
+# Allow pip to only run in a virtual environment; exit with an error otherwise.
+export PIP_REQUIRE_VIRTUALENV=true
+
# vim: et ft=zsh :