* VCS_INFO functions break with setopt no_unset
@ 2015-12-07 23:23 Philip Sequeira
2015-12-23 1:38 ` Frank Terbeck
0 siblings, 1 reply; 2+ messages in thread
From: Philip Sequeira @ 2015-12-07 23:23 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 214 bytes --]
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.
[-- Attachment #2: zsh-vcs-info-unset.patch --]
[-- Type: text/x-patch, Size: 1050 bytes --]
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@bewatermyfriend.org>
## 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@bewatermyfriend.org>
## 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: VCS_INFO functions break with setopt no_unset
2015-12-07 23:23 VCS_INFO functions break with setopt no_unset Philip Sequeira
@ 2015-12-23 1:38 ` Frank Terbeck
0 siblings, 0 replies; 2+ messages in thread
From: Frank Terbeck @ 2015-12-23 1:38 UTC (permalink / raw)
To: Philip Sequeira; +Cc: zsh-workers
Hi Philip,
Philip Sequeira wrote:
> With setopt no_unset in my config file, vcs_info fails with:
> VCS_INFO_maxexports:7: vcs: parameter not set
I just checked and this was not committed yet. So I am doing that now.
> The attached patch fixes it on my system, but I don't know if it's the
> best way to deal with the problem.
I always thought NO_UNSET was a rather weird setting; but I guess this
will do for now. If things get more complicated, we can always blast all
vcs_info functions with a stern "emulate -L zsh" on top of each
function.
Regards, Frank
--
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
-- RFC 1925
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-23 1:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-07 23:23 VCS_INFO functions break with setopt no_unset Philip Sequeira
2015-12-23 1:38 ` Frank Terbeck
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).