From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Goetz Epperlein <lony_@gmx.de>
Cc: zsh-workers@zsh.org
Subject: Re: ZSH vcs_info are not updated if alias is used
Date: Tue, 23 Apr 2019 11:03:58 +0200 [thread overview]
Message-ID: <CAN=4vMpeRD+xD1sSE3thN9VSM3cgTJM8KXg16X95Fusdj7kiCg@mail.gmail.com> (raw)
In-Reply-To: <CABUUM4CtwVRDjXWcNOzN7cN3eq9SeB9O=4xL=kbYFB_9x9QpYA@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1907 bytes --]
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
.
This code tries to avoid calling `vcs_info` unless the last command in the
history was a `git` command. This is liable to break in corner cases. E.g.,
if you change the state of a git repo in one shell, it won't be updated in
another.
Roman.
On Tue, Apr 23, 2019 at 10:54 AM Goetz Epperlein <lony_@gmx.de> wrote:
> Hello ZSH maintainers,
>
> I have a bug regarding the vcs_info extension.
>
> When I change my branch inside my zsh sadly it is not reflecting the
> current branch if I use an alias, but works if I use git checkout <branch>
> I traced the problem down to vcs_info as my theme is using it to render the
> branch name, but do not know how to solve this.
>
> [image: image.png]
>
> I use oh-my-zsh and my custom theme for oh-my-zsh hosted on github
> <https://github.com/lony/dotFiles/blob/master/ansible/roles/dotfiles/src/bash_zsh/.zsh_oh-my-zsh/themes/lony.zsh-theme>
> .
>
> My current zsh version is:
>
> ❯ zsh --version
> zsh 5.7.1 (x86_64-apple-darwin18.2.0)
>
> My aliases look like the following:
>
> ❯ alias | grep gc
> gc='git checkout'
> gco='git commit'
>
> My git version is:
>
> ❯ git --version
> git version 2.21.0
>
> I run zsh inside tmux on a Mac using iTerm2, as everything is installed
> with homebrew it is updated to the latest version.
>
> Any ideas what could cause this and how to fix it?
>
> I also posted this question on stackoverflow, if this is easier to answer
> somehow:
>
> https://stackoverflow.com/questions/55131008/zsh-vcs-info-are-not-updated-if-alias-is-used
>
> This bug maybe related to users/20807
>
> Any help would be appreciated.
>
> Thank you and kind regards,
> lony
>
[-- Attachment #1.2: Type: text/html, Size: 3579 bytes --]
[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 36609 bytes --]
next prev parent reply other threads:[~2019-04-23 9:05 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 [this message]
2019-04-23 10:39 ` Roman Perepelitsa
2019-04-28 18:05 ` Goetz Epperlein
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='CAN=4vMpeRD+xD1sSE3thN9VSM3cgTJM8KXg16X95Fusdj7kiCg@mail.gmail.com' \
--to=roman.perepelitsa@gmail.com \
--cc=lony_@gmx.de \
--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).