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

PATCH: vcs_info: set `max-exports' early after certain `start-up' hooks



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