]> git.alrj.org Git - zsh.d.git/blob - S60_virtualenv
Add a wrapper for mc to stay in current directory upon exit
[zsh.d.git] / S60_virtualenv
1 #! /usr/bin/zsh
2
3 # Those can be used, for instance to construct the prompt:
4 __ZSH_VIRTUAL_ENV_NAME=""
5
6 virtualenv_precmd() {
7   if [[ -n "${VIRTUAL_ENV}" ]]; then
8     __ZSH_VIRTUAL_ENV_NAME="$(basename ${VIRTUAL_ENV})"
9   else
10     __ZSH_VIRTUAL_ENV_NAME=""
11   fi
12 }
13
14
15 precmd_functions+='virtualenv_precmd'