a5fc78c24cf551cffecce2890c39edb9caa7d83c
- Author
- Michael Aquilina <michaelaquilina@gmail.com>
- Committer
- Michael Aquilina <michaelaquilina@gmail.com>
- Date
Message
Display message when a python project is detected
Diff
1diff --git a/autoswitch_virtualenv.plugin.zsh b/autoswitch_virtualenv.plugin.zsh
2index dbb9e389d1428adbd298f30b31ffb79086db5bf1..de99fce853351be4e2ee39cca11fbc14547272e8 100644
3--- a/autoswitch_virtualenv.plugin.zsh
4+++ b/autoswitch_virtualenv.plugin.zsh
5@@ -79,6 +79,11 @@ function _check_venv_path()
6 # Automatically switch virtualenv when .venv file detected
7 function check_venv()
8 {
9+ if [[ -f "requirements.txt" ]] && [[ ! -f ".venv" ]]; then
10+ printf "Python project detected. "
11+ printf "Run ${PURPLE}mkvenv${NORMAL} to setup autoswitching\n"
12+ fi
13+
14 SWITCH_TO=""
15
16 # Get the .venv file, scanning parent directories