my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
459 B

3 years ago
  1. # Don't continue if direnv is not found
  2. command -v direnv &>/dev/null || return
  3. _direnv_hook() {
  4. trap -- '' SIGINT;
  5. eval "$(direnv export zsh)";
  6. trap - SIGINT;
  7. }
  8. typeset -ag precmd_functions;
  9. if [[ -z ${precmd_functions[(r)_direnv_hook]} ]]; then
  10. precmd_functions=( _direnv_hook ${precmd_functions[@]} )
  11. fi
  12. typeset -ag chpwd_functions;
  13. if [[ -z ${chpwd_functions[(r)_direnv_hook]} ]]; then
  14. chpwd_functions=( _direnv_hook ${chpwd_functions[@]} )
  15. fi