From: Clint Adams <schizo@debian.org>
To: "martin f. krafft" <madduck@debian.org>,
"martin f. krafft" <madduck@madduck.net>
Cc: zsh-workers@sunsite.dk
Subject: Re: [PATCH] typeset reply array
Date: Sun, 18 May 2008 05:33:01 +0000 [thread overview]
Message-ID: <20080518053301.GA8521@scru.org> (raw)
In-Reply-To: <1211026277-27464-2-git-send-email-madduck@debian.org> <1211025324-25630-1-git-send-email-madduck@debian.org>
I think that some of these will break things. For example, if you keep
_comp_dumpfile local to compinit, when/if compinit calls compdump,
problems might ensue.
I don't know why we can't call compdump with an argument though.
On Sat, May 17, 2008 at 12:55:24PM +0100, martin f. krafft wrote:
> From: martin f. krafft <madduck@madduck.net>
>
> With warn_create_global set, the function otherwise causes warnings
> like this:
>
> url-quote-magic:1: array parameter reply created globally in
> function
>
> Signed-off-by: martin f. krafft <madduck@debian.org>
> ---
> Functions/Zle/url-quote-magic | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/Functions/Zle/url-quote-magic b/Functions/Zle/url-quote-magic
> index 826d26d..e15d117 100644
> --- a/Functions/Zle/url-quote-magic
> +++ b/Functions/Zle/url-quote-magic
> @@ -65,11 +65,12 @@ zstyle -m ':url-quote-magic:\*' url-metas '*' ||
> zstyle ':url-quote-magic:*' url-metas '*?[]^(|)~#{}='
>
> zstyle -m ':url-quote-magic:\*' url-seps '*' ||
> - zstyle -e ':url-quote-magic:*' url-seps 'reply=(";&<>${histchars[1]}")'
> + zstyle -e ':url-quote-magic:*' url-seps 'typeset -a reply; reply=(";&<>${histchars[1]}")'
>
> zstyle -m :url-quote-magic url-globbers '*' ||
> zstyle -e :url-quote-magic url-globbers \
> 'zmodload -i zsh/parameter;
> + typeset -a reply;
> reply=( noglob
> ${(k)galiases[(R)(* |)(noglob|urlglobber|globurl) *]:-}
> ${(k)aliases[(R)(* |)(noglob|urlglobber|globurl) *]:-} )'
> --
> 1.5.5.1
On Sat, May 17, 2008 at 01:11:17PM +0100, martin f. krafft wrote:
> With warn_create_global set, the function otherwise causes warnings
> like this:
>
> compinit:123: scalar parameter _comp_dumpfile created globally in function
> compinit:130: array parameter _comp_options created globally in function
> compinit:164: scalar parameter _comp_setup created globally in function
> compinit:169: array parameter compprefuncs created globally in function
> compinit:170: array parameter comppostfuncs created globally in function
>
> Signed-off-by: martin f. krafft <madduck@debian.org>
> ---
> Completion/compinit | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/Completion/compinit b/Completion/compinit
> index a4edd24..30dc26c 100644
> --- a/Completion/compinit
> +++ b/Completion/compinit
> @@ -120,13 +120,14 @@ typeset -gA _lastcomp
> # Remember dumpfile.
> if [[ -n $_i_dumpfile ]]; then
> # Explicitly supplied dumpfile.
> - _comp_dumpfile="$_i_dumpfile"
> + local _comp_dumpfile="$_i_dumpfile"
> else
> _comp_dumpfile="${ZDOTDIR:-$HOME}/.zcompdump"
> fi
>
> # The standard options set in completion functions.
>
> +typeset -a _comp_options
> _comp_options=(
> bareglobqual
> extendedglob
> @@ -157,6 +158,7 @@ _comp_options=(
> # have a valid stdin descriptor (zle closes it before calling widgets)
> # and don't get confused by user's ZERR trap handlers.
>
> +typeset -l _comp_setup
> _comp_setup='setopt localoptions localtraps ${_comp_options[@]};
> local IFS=$'\'\ \\t\\r\\n\\0\''
> exec </dev/null;
> @@ -165,8 +167,8 @@ _comp_setup='setopt localoptions localtraps ${_comp_options[@]};
> # These can hold names of functions that are to be called before/after all
> # matches have been generated.
>
> -compprefuncs=()
> -comppostfuncs=()
> +typeset -a compprefuncs; compprefuncs=()
> +typeset -a comppostfuncs; comppostfuncs=()
>
> # Loading it now ensures that the `funcstack' parameter is always correct.
>
> --
> 1.5.5.1
next parent reply other threads:[~2008-05-18 5:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1211026277-27464-1-git-send-email-madduck@debian.org>
[not found] ` <1211026277-27464-2-git-send-email-madduck@debian.org>
[not found] ` <1211025324-25630-1-git-send-email-madduck@debian.org>
2008-05-18 5:33 ` Clint Adams [this message]
2008-05-18 16:40 ` Bart Schaefer
2008-05-18 16:49 ` martin f krafft
2008-05-18 17:17 ` Peter Stephenson
2008-05-18 19:23 ` Peter Stephenson
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=20080518053301.GA8521@scru.org \
--to=schizo@debian.org \
--cc=madduck@debian.org \
--cc=madduck@madduck.net \
--cc=zsh-workers@sunsite.dk \
/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).