Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Problem with VCS_INFO's disable-patterns
- X-seq: zsh-workers 33398
- From: Marco Hinz <mh.codebro@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Problem with VCS_INFO's disable-patterns
- Date: Thu, 9 Oct 2014 13:28:17 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; bh=XrcgFqR9TDl5z41uSx5+UzR+vAwYIDysT0a1Jnb5s1c=; b=UxfIX6vyLTOy++leN4xLAKLubFPDcqt0dSWyvh+Wy92WxZXPhI05FYSBlSmXYGGBuh Z8cGE5rww+I48BGjyPYmIFpkNLAVDK8qNTQE1F6RlN2itfvJ9DpAQ+yXV9I+FpP9tRVM VpHg04lTpiCHejCZDMo5P4ofbUYxkOSPLGzX825PzCp9mj5QS206eKfnh19AHfhaRf/j qpRu2QYFFGWUHytnDrYD3RRNrG0SS3vi+XAqzgUYEIbQfmV+jCTR+M+tohsWckGperzz YsuaGIq/ToattGgfAL9KyQygDeEIopGwOwAIbQead6NFuXSjpC1CACTXYF1fSLZzYNXd 6VwA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hi,
Problem
=======
I have the following in my zshrc:
zstyle ':vcs_info:*' disable-patterns '/data/linux/stable(|/*)'
Now, when I switch to that directory or any of its subfolders, I get the
following error:
VCS_INFO_set:typeset:11: not valid in this context: vcs_info_msg_-1_
When vcs_info() is executed, $maxexports apparently is 0 at:
https://github.com/zsh-users/zsh/blob/master/Functions/VCS_Info/vcs_info#L97
Then, in the loop {0..-1} gets expended and fails at typeset:
https://github.com/zsh-users/zsh/blob/master/Functions/VCS_Info/VCS_INFO_set#L10-L11
Possible solution
=================
The line before the loop contains:
[[ $2 == '-preinit-' ]] && (( maxexports == 0 )) && (( maxexports = 1 ))
The condition for '-preinit-' is probably there on purpose, but for my
problem case (where $2 doesn't exist), this would work fine:
(( maxexports == 0 )) && (( maxexports = 1 ))
But that probably doesn't fix the root of the problem and breaks stuff
in other cases.
--
Github: http://github.com/mhinz | Twitter: http://twitter.com/_mhinz_
Messages sorted by:
Reverse Date,
Date,
Thread,
Author