Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zshrc alias



On 2013-10-02 at 15:37 -0400, shawn wilson wrote:
> Is there a way to see what zsh is doing when it loads the rc file?

I keep this at the top of my .zshenv file and uncomment the first line
when I want to debug something:

----------------------------8< cut here >8------------------------------
#TRACE_ZSH_TIME=t TRACE_ZSH=t TRACE_ZSH_FILE=/tmp/pdp-zsh.$$.log

[[ -n $TRACE_ZSH_PROF ]] && zmodload -i zsh/zprof
[[ -n $TRACE_ZSH_TIME ]] && PS4='+[%D{%M:%S}]%N:%i> '
if [[ -n $TRACE_ZSH ]]; then
        [[ -n "$TRACE_ZSH_FILE" ]] && exec 2> "${TRACE_ZSH_FILE}"
        setopt xtrace
fi
----------------------------8< cut here >8------------------------------

Yes, you lose stderr to a file, I can accept that for the purpose of
this debugging.

-Phil



Messages sorted by: Reverse Date, Date, Thread, Author