Skip to content

Commit

Permalink
Update dot_zshrc
Browse files Browse the repository at this point in the history
  • Loading branch information
wardnath authored Dec 29, 2024
1 parent 22fd64c commit cb1e1b6
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions chezmoi/dot_zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,6 @@ export PATH="/usr/local/bin:/usr/local/sbin:${HOME}/.local/bin:$PATH"

export XDG_DATA_DIRS="$XDG_DATA_DIRS:/var/lib/flatpak/exports/share:/root/.local/share/flatpak/exports/share"

_direnv_hook() {
trap -- '' SIGINT
eval "$("/nix/store/3mydh7746lji25ry2aygsy5i4s0i23x2-direnv-2.35.0/bin/direnv" export zsh)"
trap - SIGINT
}
typeset -ag precmd_functions
if (( ! ${precmd_functions[(I)_direnv_hook]} )); then
precmd_functions=(_direnv_hook $precmd_functions)
fi
typeset -ag chpwd_functions
if (( ! ${chpwd_functions[(I)_direnv_hook]} )); then
chpwd_functions=(_direnv_hook $chpwd_functions)
fi


if [ -z "$VIRTUAL_ENV" ]; then
echo "No virtual environment is active. Activating $VENV_DIR..."
# Activate the virtual environment
Expand All @@ -41,3 +26,16 @@ else
echo "Virtual environment already active: $VIRTUAL_ENV"
fi

_direnv_hook() {
trap -- '' SIGINT
eval "$("/nix/store/3mydh7746lji25ry2aygsy5i4s0i23x2-direnv-2.35.0/bin/direnv" export zsh)"
trap - SIGINT
}
typeset -ag precmd_functions
if (( ! ${precmd_functions[(I)_direnv_hook]} )); then
precmd_functions=(_direnv_hook $precmd_functions)
fi
typeset -ag chpwd_functions
if (( ! ${chpwd_functions[(I)_direnv_hook]} )); then
chpwd_functions=(_direnv_hook $chpwd_functions)
fi

0 comments on commit cb1e1b6

Please sign in to comment.