zsh-workers
 help / color / mirror / code / Atom feed
From: Goetz Epperlein <lony_@gmx.de>
To: Roman Perepelitsa <roman.perepelitsa@gmail.com>
Cc: zsh-workers@zsh.org
Subject: Re: ZSH vcs_info are not updated if alias is used
Date: Sun, 28 Apr 2019 20:05:01 +0200	[thread overview]
Message-ID: <CABUUM4ACagB=s3jYy0w9Xh-Bnm5EuPGnQ5wAzuTmKfWPNuzTJQ@mail.gmail.com> (raw)
In-Reply-To: <CAN=4vMqZaMsJk2EsWaQQWA7NjK0+BqmpiRurEt_fjt6g5EVeWg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1784 bytes --]

Hello Roman,

I looked into your solutions and found the brute force the easiest for me
<https://github.com/lony/dotFiles/blob/master/ansible/roles/dotfiles/src/bash_zsh/.zsh_oh-my-zsh/themes/lony.zsh-theme>
.

As match I liked your solution I do not like to install additional software.
Do you know if there will be any "merge" into vcs_info from your
enhancements?

Kind regards and thanks again,
Goetz

Am Di., 23. Apr. 2019 um 12:39 Uhr schrieb Roman Perepelitsa <
roman.perepelitsa@gmail.com>:

> On Tue, Apr 23, 2019 at 11:03 AM Roman Perepelitsa
> roman.perepelitsa@gmail.com <http://mailto:roman.perepelitsa@gmail.com>
> wrote:
>
> The problem is here:
>> https://github.com/lony/dotFiles/blob/f5f1691499e7a95a3a2e4f1e0970f0ae46f4b40e/ansible/roles/dotfiles/src/bash_zsh/.zsh_oh-my-zsh/themes/lony.zsh-theme#L69
>> .
>>
> I should’ve mentioned how you can fix it. The simplest fix is to add your
> git aliases to the linked code. This, however, won’t fix all corner cases.
> It might be possible to expand aliases there but it still won’t for
> functions and scripts that call git.
>
> An alternative solution is to call vcs_info from precmd hook on every
> prompt. This will be correct but slow.
>
> To solve the performance problem you can replace vcs_info with gitstatus
> <https://github.com/romkatv/gitstatus>, which is over 10x faster. There
> is an example
> <https://github.com/romkatv/gitstatus/blob/master/zsh-prompt-example.zsh>
> you can follow.
>
> Powerlevel10k <https://github.com/romkatv/powerlevel10k> provides a
> turnkey solution. It’s already integrated with gitstatus, it’s very fast,
> and very flexible. You can configure Powerlevel10k to look like your
> current scheme, if you like.
>
> Roman.
>

  reply	other threads:[~2019-04-28 18:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23  8:52 Goetz Epperlein
2019-04-23  9:03 ` Roman Perepelitsa
2019-04-23 10:39   ` Roman Perepelitsa
2019-04-28 18:05     ` Goetz Epperlein [this message]
2019-04-28 18:22       ` 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='CABUUM4ACagB=s3jYy0w9Xh-Bnm5EuPGnQ5wAzuTmKfWPNuzTJQ@mail.gmail.com' \
    --to=lony_@gmx.de \
    --cc=roman.perepelitsa@gmail.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).