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

VCS_INFO functions break with setopt no_unset



With setopt no_unset in my config file, vcs_info fails with:
VCS_INFO_maxexports:7: vcs: parameter not set

The attached patch fixes it on my system, but I don't know if it's the
best way to deal with the problem.
diff --git a/Functions/VCS_Info/VCS_INFO_maxexports b/Functions/VCS_Info/VCS_INFO_maxexports
index ea95251..d697b9a 100644
--- a/Functions/VCS_Info/VCS_INFO_maxexports
+++ b/Functions/VCS_Info/VCS_INFO_maxexports
@@ -2,7 +2,7 @@
 ## Written by Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
 ## Distributed under the same BSD-ish license as zsh itself.
 
-setopt localoptions NO_shwordsplit
+setopt localoptions NO_shwordsplit unset
 
 zstyle -s ":vcs_info:${vcs}:${usercontext}:${rrn}" "max-exports" maxexports || maxexports=2
 if [[ ${maxexports} != <-> ]] || (( maxexports < 1 )); then
diff --git a/Functions/VCS_Info/VCS_INFO_set b/Functions/VCS_Info/VCS_INFO_set
index 484c793..e3f62ce 100644
--- a/Functions/VCS_Info/VCS_INFO_set
+++ b/Functions/VCS_Info/VCS_INFO_set
@@ -2,7 +2,7 @@
 ## Written by Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
 ## Distributed under the same BSD-ish license as zsh itself.
 
-setopt localoptions noksharrays NO_shwordsplit
+setopt localoptions noksharrays NO_shwordsplit unset
 local -i i j
 
 if [[ $1 == '--nvcs' ]] ; then


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