Skip to content

Commit

Permalink
🔧 Zsh,Bash: ae alias now takes venv name as parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ebouchut committed Oct 1, 2024
1 parent a72b361 commit 7ea71cf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion tag-bash/bash/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
7 changes: 6 additions & 1 deletion tag-zsh/zsh/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 7ea71cf

Please sign in to comment.