mirror of
https://github.com/lloeki/dotfiles.git
synced 2025-12-06 07:24:39 +01:00
25 lines
640 B
Text
Executable file
25 lines
640 B
Text
Executable file
if command -v direnv 2>&1 >/dev/null; then
|
|
if [[ -n $BASH_VERSION ]]; then
|
|
# eval "$(direnv hook bash)"
|
|
_direnv_hook() {
|
|
local previous_exit_status=$?;
|
|
trap -- '' SIGINT;
|
|
eval "$("${HOME}/.nix-profile/bin/direnv" export bash)";
|
|
trap - SIGINT;
|
|
return $previous_exit_status;
|
|
};
|
|
fi
|
|
if [[ -n $ZSH_VERSION ]]; then
|
|
# eval "$(direnv hook zsh)"
|
|
_direnv_hook() {
|
|
trap -- '' SIGINT;
|
|
eval "$("${HOME}/.nix-profile/bin/direnv" export zsh)";
|
|
trap - SIGINT;
|
|
}
|
|
fi
|
|
else
|
|
_direnv_hook() {
|
|
:
|
|
}
|
|
fi
|
|
|