X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/a2a79686218f805dd5a7cfbda210a517fe5c4934..57d8fb02350273da083d12c96a460a666ef4a9e7:/.zsh/zshrc/00_varsetup?ds=inline diff --git a/.zsh/zshrc/00_varsetup b/.zsh/zshrc/00_varsetup index 68ec386..fd36072 100644 --- a/.zsh/zshrc/00_varsetup +++ b/.zsh/zshrc/00_varsetup @@ -16,4 +16,16 @@ typeset -ga preexec_functions typeset -ga precmd_functions typeset -ga chpwd_functions +__chpwd_run_first() +{ + [[ -n $__CHPWD_RUN_FIRST ]] || return + eval "$__CHPWD_RUN_FIRST" +} +chpwd_functions+=__chpwd_run_first + +# warn on accidental creation of global variables +# unset for now until we work out the corner cases, like warning about $reply +# and $HISTFILE or $REPORTTIME. +#setopt warn_create_global + # vim:ft=zsh