From 7ea71cf17e2ad17bc0aaa88f0df2557009dd482a Mon Sep 17 00:00:00 2001 From: Eric Bouchut Date: Tue, 1 Oct 2024 13:20:00 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Zsh,Bash:=20ae=20alias=20now=20t?= =?UTF-8?q?akes=20venv=20name=20as=20parameter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tag-bash/bash/aliases | 7 ++++++- tag-zsh/zsh/aliases | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tag-bash/bash/aliases b/tag-bash/bash/aliases index 71bee06..4fb3119 100644 --- a/tag-bash/bash/aliases +++ b/tag-bash/bash/aliases @@ -18,7 +18,12 @@ case $OSTYPE in esac # # Activate/deactivate Python virtual environment -alias ae='deactivate &> /dev/null; source ./venv/bin/activate' +activate_venv() { + local venv_name="${1:-venv}" + deactivate &>/dev/null + source ./${venv_name}/bin/activate +} +alias ae='activate_venv' alias de='deactivate' alias ddu='du --max-depth=1 -h' diff --git a/tag-zsh/zsh/aliases b/tag-zsh/zsh/aliases index fa97171..75a98d7 100644 --- a/tag-zsh/zsh/aliases +++ b/tag-zsh/zsh/aliases @@ -18,7 +18,12 @@ case $OSTYPE in esac # Activate/deactivate Python virtual environment -alias ae='deactivate &> /dev/null; source ./venv/bin/activate' +activate_venv() { + local venv_name="${1:-venv}" + deactivate &>/dev/null + source ./${venv_name}/bin/activate +} +alias ae='activate_venv' alias de='deactivate' alias ddu='du --max-depth=1 -h'