Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: VCS_info seems really slow on remote filesystem
- X-seq: zsh-workers 44900
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: VCS_info seems really slow on remote filesystem
- Date: Thu, 7 Nov 2019 20:00:03 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=o+DM6AXwa4TweVWLwX8kutzJoxesFYcfXGfKvzN2rN4=; b=d17ZwcDJlEnGbg8LwZI+hAr7P3i3yz0GClzrhEzHcRN/favVnb02FMyISdiBUWYhfz 8Ua5GDQ9jRjaHLcrVMbMQsoc7lo1VMrTAGFi1XxsbTd7toJssBfB8lFOqWu0i1BEd+GS 4S9eH27USrHiTc2V7aavlclM5vQ4xkr8xeCdrAn/ZFnAEbWS2eJKXhorRuehKKoXI/UH 4J72tAQoM3rt/TGbwcD3ylVOaN9frl9rDWKS0DSyJrvx22VfavhwOeNhWmUk2IShMv0j lgZPJJqJboiZ+MXfc75p7TVqEqIGOv4rNdQU66RimzKFIH/+40fJYl7FwHT9DTDd+i2d o5QA==
- In-reply-to: <CAH+w=7bhriPAtqr=dAwPhfiW45rX0SmxjyYwPMeXgjQiOX5rKw@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAH+w=7bhriPAtqr=dAwPhfiW45rX0SmxjyYwPMeXgjQiOX5rKw@mail.gmail.com>
On Thu, Nov 7, 2019 at 7:41 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author