zsh-workers
 help / color / mirror / code / Atom feed
From: Philip Sequeira <phsequei@gmail.com>
To: zsh-workers@zsh.org
Subject: VCS_INFO functions break with setopt no_unset
Date: Mon, 7 Dec 2015 18:23:25 -0500	[thread overview]
Message-ID: <CAB_3nvqT89iskZ5wzQvUbMun7F80rsY4xJDmuiCp41=+baHomg@mail.gmail.com> (raw)

[-- 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

             reply	other threads:[~2015-12-07 23:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-07 23:23 Philip Sequeira [this message]
2015-12-23  1:38 ` Frank Terbeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAB_3nvqT89iskZ5wzQvUbMun7F80rsY4xJDmuiCp41=+baHomg@mail.gmail.com' \
    --to=phsequei@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).