zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: vcs_info: unreadable executable directories don't flush $vcs_info_msg_N_
Date: Wed, 17 Jun 2020 08:47:15 +0000	[thread overview]
Message-ID: <20200617084715.6b91f81c@tarpaulin.shahaf.local2> (raw)

[[[
$ zsh -f
% autoload vcs_info
% git init foo
% mkdir -m117 bar
% cd foo
% autoload vcs_info; precmd() { vcs_info; typeset -pm 'vcs_info_msg_*_' }
typeset -g vcs_info_msg_0_=' (git)-[master]-'
typeset -g vcs_info_msg_1_=''
% cd ../bar
typeset -g vcs_info_msg_0_=' (git)-[master]-'
typeset -g vcs_info_msg_1_=''
%
]]]

I would have expected vcs_info_msg_0_ to be empty or unset after the
last cd command.  The current behaviour amounts to displaying wrong
information.

---

Preliminary analysis.  vcs_info has this code at the very top:

% < Functions/VCS_Info/vcs_info nl -ba | vipe
    50	vcs_info () {
    51	    emulate -L zsh
    52	    setopt extendedglob NO_warn_create_global
    53	
    54	    [[ -r . ]] || return 0

I'm guessing VCS_INFO_set should be called before returning.

It's on my list but not near the top; feel free to beat me to it.

Cheers,

Daniel

                 reply	other threads:[~2020-06-17  8:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20200617084715.6b91f81c@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --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).