From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17058 invoked by alias); 10 Apr 2013 17:04:16 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17754 Received: (qmail 7021 invoked from network); 10 Apr 2013 17:04:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at samsung.com does not designate permitted sender hosts) X-AuditID: cbfec7f5-b7fd76d000007247-0e-51659b89ea9b Date: Wed, 10 Apr 2013 18:04:08 +0100 From: Peter Stephenson To: "zsh-users@zsh.org" Subject: Re: typeset -T shouldn't cause an exit. Message-id: <20130410180408.01bfde08@pwslap01u.europe.root.pri> In-reply-to: References: Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmluLIzCtJLcpLzFFi42I5/e/4Vd3O2amBBr29xhY7Tq5kdGD0WHXw A1MAYxSXTUpqTmZZapG+XQJXxrKj/9gKHnJUzPn3ibWB8S1bFyMnh4SAicTMpmfsELaYxIV7 68HiQgJLGSW2fYnrYuQCsZkk1rUeZAFJsAioSlx+dJMZxGYTMJSYumk2I4gtIqAt8bHvOFhc WMBA4u+N+UBxDg5eAXuJRWtZQcKcAqESp15fYIGYHyJx/vcnJhCbX0Bf4upfCFsCqHzmlTNg I3kFBCV+TL4HVs8soCWxeVsTK4QtL7F5zVvmCYwCs5CUzUJSNgtJ2QJG5lWMoqmlyQXFSem5 RnrFibnFpXnpesn5uZsYIQH4dQfj0mNWhxgFOBiVeHhPNqQGCrEmlhVX5h5ilOBgVhLhFe8F CvGmJFZWpRblxxeV5qQWH2Jk4uCUamCcWpawMXWzUqHLmWPXt0b5nc/IWjDLM8mkO818V5xI XNrE5k+p61foWlT6/Ij78Ogc/8kH+7Zr1uudOp5gd+5NavWcJ+phtnnLVF2V9jIfWJxUsqvi Uvux1FILu7leOZo94onmhpOc60smncm6/XhmetefcxnZUznMHwbcuGdXUFAfvdFMaooSS3FG oqEWc1FxIgCK9h3kHgIAAA== On Wed, 10 Apr 2013 15:59:10 +0000 Larry Schrof 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