mirror of
https://github.com/eliasrenman/dotfiles.git
synced 2026-03-16 20:46:08 +01:00
chore: cleanup zshrc
This commit is contained in:
42
.zshrc
42
.zshrc
@@ -35,45 +35,3 @@ alias vi="nvim"
|
|||||||
alias oldvim="vim"
|
alias oldvim="vim"
|
||||||
alias ls="exa"
|
alias ls="exa"
|
||||||
alias cat="batcat"
|
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
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user