Commits

Randy Stauner committed a9125ba

Activate local virtualenv and add name to prompt

Comments (0)

Files changed (2)

home/.bashrc.d/prompt.bashrc

 
   # vary main prompt color by hostname if we're at work (judged by having more than 1 dot in hostname)
   PS1_MAIN_COLOR=`perl -e '$h=$ARGV[0]; print 30 + (($h =~ tr/.//) >= 2 ? (ord(substr($ARGV[0], 0, 1)) % 6) + 1 : 6)' $(hostname)`
-  PS1='\[ \033[0000m\033[${PS1_MAIN_COLOR}m\u\033[37m@\033[$PS1_MAIN_COLOR;01m\h\033[00;37m:\033[00;${PS1_MAIN_COLOR}m\w\033[37m #\033[33m\l \033[34m[\033[33m&\033[36m\j\033[34m \t \033[36m$?\033[33m?\033[34m] \033[35m\s \V\033[32m/\033[33m${MULTIPLEXER}\033[34m perl/$PERLBREW_PERL${rvm_version:+ \033[35m${GEM_HOME##*/}}\033[00m \]\n\$ '
+  PS1='\[ \033[0000m\033[${PS1_MAIN_COLOR}m\u\033[37m@\033[$PS1_MAIN_COLOR;01m\h\033[00;37m:\033[00;${PS1_MAIN_COLOR}m\w\033[37m #\033[33m\l \033[34m[\033[33m&\033[36m\j\033[34m \t \033[36m$?\033[33m?\033[34m] \033[35m\s \V\033[32m/\033[33m${MULTIPLEXER}\033[34m perl/$PERLBREW_PERL${VIRTUAL_ENV:+ \033[33mpy/}${VIRTUAL_ENV##*/}\033[00m${rvm_version:+ \033[35m${GEM_HOME##*/}}\033[00m \]\n\$ '
 #fi
 
 # use "set -x" to show the commands about to be executed (prefixed by PS4)

home/.bashrc.d/python.bashrc

 export PYTHONSTARTUP=$HOME/.python_startup
 
 alias json_tool='python -m json.tool'
+
+export VIRTUAL_ENV_DISABLE_PROMPT=1
+source_rc_files ~/python/venv/local/bin/activate