From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: VCS_info seems really slow on remote filesystem
Date: Thu, 7 Nov 2019 20:00:03 -0800 [thread overview]
Message-ID: <CAH+w=7YotzBpOK9cEQqCQ-87CskeyZ0KZpbjiaTXm58Qq8AiWQ@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7bhriPAtqr=dAwPhfiW45rX0SmxjyYwPMeXgjQiOX5rKw@mail.gmail.com>
On Thu, Nov 7, 2019 at 7:41 PM Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> Is there anyone more familiar than I with the implementation than I,
> who could determine whether any of this information could be cached
> instead of being regenerated on every precmd?
To partly answer my own question -- I've taken advantage of the fact
that I'm also using "prompt bart" which conveniently sets the global
variable $PSCMD. So I just changed to this:
vcs-info-v() { [[ $PSCMD = git* ]] && vcs_info; RPS1=${vcs_info_msg_0_% } }
add-zsh-hook precmd vcs-info-v
add-zsh-hook chpwd vcs_info
and now my prompts are fast until I either change directories or run a
git command. Would need tweaking if I were making significant use of
git aliases, but for now this suffices.
next prev parent reply other threads:[~2019-11-08 4:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-08 3:41 Bart Schaefer
2019-11-08 4:00 ` Bart Schaefer [this message]
2019-11-08 10:24 ` Daniel Shahaf
2019-11-08 10:32 ` Roman Perepelitsa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH+w=7YotzBpOK9cEQqCQ-87CskeyZ0KZpbjiaTXm58Qq8AiWQ@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).