chore: cleanup zshrc

This commit is contained in:
Elias Renman
2023-11-29 00:12:58 +01:00
parent 679b361d76
commit 60edd565d6

42
.zshrc
View File

@@ -35,45 +35,3 @@ alias vi="nvim"
alias oldvim="vim"
alias ls="exa"
alias cat="batcat"
source /home/eliasrenman/alacritty/extra/completions/alacritty.bash
PATH="$HOME/.local/bin:$PATH"
<LeftMouse>function cd() {
builtin cd "$@"
if [[ -z "$VIRTUAL_ENV" ]] ; then
## If env folder is found then activate the vitualenv
if [[ -d ./.env ]] ; then
source ./.env/bin/activate
fi
else
## check the current folder belong to earlier VIRTUAL_ENV folder
# if yes then do nothing
# else deactivate
parentdir="$(dirname "$VIRTUAL_ENV")"
if [[ "$PWD"/ != "$parentdir"/* ]] ; then
deactivate
fi
fi
}
function cd() {
builtin cd "$@"
if [[ -z "$VIRTUAL_ENV" ]] ; then
## If env folder is found then activate the vitualenv
if [[ -d ./.env ]] ; then
source ./.env/bin/activate
fi
else
## check the current folder belong to earlier VIRTUAL_ENV folder
# if yes then do nothing
# else deactivate
parentdir="$(dirname "$VIRTUAL_ENV")"
if [[ "$PWD"/ != "$parentdir"/* ]] ; then
deactivate
fi
fi
}