Skip to content

Python virtualenv activate and deactivate scripts for tcsh

Notifications You must be signed in to change notification settings

angelsaj/virtualenv.tcsh

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

-------------------------------------------------------------------------------
Python virtualenv activation and deactivation scripts for tcsh
-------------------------------------------------------------------------------

By default, these scripts assume that they have been be copied into ~/bin/,
but this can be customized if necessary.

To run these scripts, navigate to your virtualenv root directory, and run:

source ~/bin/activate.tcsh

or:

source ~/bin/deactivate.tcsh

You can alternatively run:

source ~/bin/activate.tcsh /path/to/virtualenv/root

to activate a virtualenv from anywhere.

Note: these scripts do not mess with the prompt.  Scripts assume that the prompt is properly
handled in the .tcshrc file (using VIRTUAL_ENV environment variable).

Here is an example for setting up the prompt to show the current VIRTUAL_ENV:

set black     = '%{\033[30m%}'
set red       = '%{\033[31m%}'
set green     = '%{\033[32m%}'
set yellow    = '%{\033[33m%}'
set blue      = '%{\033[34m%}'
set magenta   = '%{\033[35m%}'
set cyan      = '%{\033[36m%}'
set white     = '%{\033[37m%}'
set nocolor   = '%{\033[0m%}'

if ( $?VIRTUAL_ENV ) then
    set VESTR = `basename $VIRTUAL_ENV`
else
    set VESTR = "-- NONE --"
endif

set prompt = "[${red}%n@%m${nocolor}][${green}${VESTR}${nocolor}][${cyan}%~${nocolor}][${yellow}%h${nocolor}]>%b "

About

Python virtualenv activate and deactivate scripts for tcsh

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%