Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 1
    Great tips, it was git_prompt_info causing my issue. Thanks Commented Sep 30, 2020 at 8:39
  • Is there a way for the timings to be displayed as time since last line of the trace, instead of absolute time? Commented Oct 11, 2024 at 17:17
  • 1
    @minseong Something like zmodload zsh/datetime; STARTREALTIME=$EPOCHREALTIME; setopt prompt_subst; PS4='$((EPOCHREALTIME - STARTREALTIME))+%N:%i> '. Or, if you don't mind that $SECONDS` is no longer an integer (that might confuse some of your zsh code): typeset -F SECONDS; setopt prompt_subst; PS4='$SECONDS+%N:%i> ' Commented Oct 11, 2024 at 20:32
  • Ye; vcs_info_xxx was added to precmd_functions and is always running whenever I press enter, which causes problem. I use a git function now: git_show_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' } which is immediate. Commented May 6 at 9:11