From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: PATCH: vcs_info: Set NO_warn_create_global option
Date: Sun, 21 Feb 2010 09:25:14 -0800 [thread overview]
Message-ID: <100221092514.ZM24056@torch.brasslantern.com> (raw)
In-Reply-To: <1266764004-15068-1-git-send-email-ft@bewatermyfriend.org>
On Feb 21, 3:53pm, Frank Terbeck wrote:
}
} zstyle -e ':vcs_info:git:*' \
} check-for-changes 'estyle-cfc && reply=( true ) || reply=( false )'
}
} That however, welcomes me with this nice warning:
} VCS_INFO_get_data_git:49: array parameter reply created globally in function
} So, there are three options:
} a) Get the big hammer and just disable `warn_create_global' in
} vcs_info.
} b) Use a smaller hammer, and create a wrapper function around zstyle
} for vcs_info, that disables the option locally.
} c) Disable `warn_create_global' in code executed by "zstyle -e". Or
} make `reply' and `REPLY' special in that case. Or whatever makes the
} most sense.
There's another option
b.5) Write the style like this:
zstyle -e ':vcs_info:git:*' \
check-for-changes 'typeset -g reply; \
estyle-cfc && reply=( true ) || reply=( false )'
Also, rather than (c) I might suggest
d) Suppress warn_create_global for the parameters "reply" and "REPLY"
at all times. In fact it probably ought to be suppressed for STTY
and a few others in the "Parameters Used By The Shell" section of
the manual.
next prev parent reply other threads:[~2010-02-21 17:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-21 14:53 Frank Terbeck
2010-02-21 15:09 ` PATCH: Disable WARN_CREATE_GLOBAL in 'zstyle -e' code Frank Terbeck
2010-02-21 15:18 ` Frank Terbeck
2010-02-21 17:25 ` Bart Schaefer [this message]
2010-02-21 20:06 ` PATCH: vcs_info: Set NO_warn_create_global option Frank Terbeck
2010-02-21 21:17 ` Bart Schaefer
2010-02-21 21:34 ` 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=100221092514.ZM24056@torch.brasslantern.com \
--to=schaefer@brasslantern.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).