From 814a9be148bc9b3781685c45e6e555960a82b2cb Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Fri, 27 Jun 2008 13:57:46 +0200 Subject: [PATCH] output lrt on chpwd first --- .zsh/zshrc/00_varsetup | 7 +++++++ .zsh/zshrc/31_cd_bugfix2 | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) 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 } -- 2.39.2