From: martin f. krafft Date: Fri, 27 Jun 2008 11:57:46 +0000 (+0200) Subject: output lrt on chpwd first X-Git-Url: https://git.madduck.net/etc/zsh.git/commitdiff_plain/814a9be148bc9b3781685c45e6e555960a82b2cb?ds=sidebyside;hp=18893ab887e52bf73e7826771665a7d515823e8d output lrt on chpwd first --- 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. diff --git a/.zsh/zshrc/31_cd_bugfix2 b/.zsh/zshrc/31_cd_bugfix2 index b1aae20..70da308 100644 --- a/.zsh/zshrc/31_cd_bugfix2 +++ b/.zsh/zshrc/31_cd_bugfix2 @@ -1,3 +1,3 @@ # fix until #480889 is fixed -cd () { builtin cd "$@" && lrt } +cd () { __CHPWD_RUN_FIRST=lrt && builtin cd "$@" && unset __CHPWD_RUN_FIRST }