Skip to content

Instantly share code, notes, and snippets.

View ostrich's full-sized avatar

Leopold ostrich

  • 10:11 (UTC -04:00)
View GitHub Profile
@ostrich
ostrich / venv.fish
Created November 28, 2023 04:41
fish shell function to create or switch to Python venv
# quick create venv
function venv
set current_directory (basename $PWD)
set venv_dir ."$current_directory"_venv
# Check if .$current_directory/bin/activate.fish exists
if test -f $venv_dir/bin/activate.fish
echo "Found existing virtual environment. Activating..."
source $venv_dir/bin/activate.fish
else