Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

vcs_info: unreadable executable directories don't flush $vcs_info_msg_N_



[[[
$ 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



Messages sorted by: Reverse Date, Date, Thread, Author