Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: vcs_info: set `max-exports' early after certain `start-up' hooks
- X-seq: zsh-workers 29526
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH: vcs_info: set `max-exports' early after certain `start-up' hooks
- Date: Thu, 30 Jun 2011 09:26:37 +0200
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
When a `start-up' hook returns `2' it sets up everything as if no VCS
was detected. For that to work, `max-exports' must be set. Otherwise
array subscripts in `VCS_INFO_set()' will not work.
diff --git a/Functions/VCS_Info/vcs_info b/Functions/VCS_Info/vcs_info
index 513489b..5a421df 100644
--- a/Functions/VCS_Info/vcs_info
+++ b/Functions/VCS_Info/vcs_info
@@ -70,6 +70,9 @@ vcs_info () {
if (( retval == 1 )); then
return 0
elif (( retval == 2 )); then
+ # This needs `max-exports' set. We're still setting it again later
+ # for more specific contexts.
+ VCS_INFO_maxexports
VCS_INFO_set --nvcs
return 0
fi
Messages sorted by:
Reverse Date,
Date,
Thread,
Author