From: Peter Stephenson <p.stephenson@samsung.com>
To: "zsh-users@zsh.org" <zsh-users@zsh.org>
Subject: Re: typeset -T shouldn't cause an exit.
Date: Wed, 10 Apr 2013 18:04:08 +0100 [thread overview]
Message-ID: <20130410180408.01bfde08@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <ED2B935DE024BE43B79F5C1268FCE9EB58E89582@PRN-MBX01-2.TheFacebook.com>
On Wed, 10 Apr 2013 15:59:10 +0000
Larry Schrof <larrys@fb.com> wrote:
? In my .zshenv, I tie LD_LIBRARY_PATH<->ld_library_path and
> CLASSPATH<->classpath.
>
> The problem is that typeset -T causes a fatal exit 126 if one attempts to
> tie
> variables that are already tied. (Fatal meaning that it stops sourcing
> my .zshenv at that line; it does not continue reading.) This seems both
> overly
> harsh and inconvenient.
>
> Can we fix this behavior so that at worst a warning is issued and zsh
> continues along happily?
That seems entirely reasonable, but note you only get the error if it
was tied to something else before, so it's not 100% benign.
diff --git a/Src/builtin.c b/Src/builtin.c
index d91c2d9..cd88643 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -2470,7 +2470,7 @@ bin_typeset(char *name, char **argv, Options ops, int func)
setsparam(asg0.name, ztrdup(asg0.value));
return 0;
} else {
- zerrnam(name, "can't tie already tied scalar: %s",
+ zwarnnam(name, "can't tie already tied scalar: %s",
asg0.name);
}
return 1;
pws
prev parent reply other threads:[~2013-04-10 17:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-10 15:59 Larry Schrof
2013-04-10 17:04 ` Peter Stephenson [this message]
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=20130410180408.01bfde08@pwslap01u.europe.root.pri \
--to=p.stephenson@samsung.com \
--cc=zsh-users@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).