X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/3cfd3322550b929dd126d509ca4a9ae7024fe71b..06245ebcc7605a22bd6f4f4cb1063ba07ea04b28:/.zsh/zshrc/00_varsetup?ds=inline diff --git a/.zsh/zshrc/00_varsetup b/.zsh/zshrc/00_varsetup index 29be5d1..09aa367 100644 --- a/.zsh/zshrc/00_varsetup +++ b/.zsh/zshrc/00_varsetup @@ -5,7 +5,7 @@ # Copyright © 1994–2008 martin f. krafft # Released under the terms of the Artistic Licence 2.0 # -# Source repository: http://git.madduck.net/v/etc/zsh.git +# Source repository: git://git.madduck.net/etc/zsh.git # # automatically remove duplicates from these arrays @@ -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.