X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/715936bac80e9d15a2d3776ff797c10aa5572c9b..f154e24079e93462f458c686f1b32eacbf601645:/.zsh/zshrc/00_varsetup diff --git a/.zsh/zshrc/00_varsetup b/.zsh/zshrc/00_varsetup index 29be5d1..fd36072 100644 --- a/.zsh/zshrc/00_varsetup +++ b/.zsh/zshrc/00_varsetup @@ -16,6 +16,13 @@ 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.