From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id OAA12844 for ; Mon, 8 Jul 1996 14:03:45 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id XAA01428; Sun, 7 Jul 1996 23:53:48 -0400 (EDT) Resent-Date: Sun, 7 Jul 1996 23:53:48 -0400 (EDT) From: Peter Bray Message-Id: <199607080349.NAA20085@cod.ind.tansu.com.au> Subject: Bug Report: Env Vars and shell functions To: zsh-workers@math.gatech.edu Date: Mon, 8 Jul 1996 13:49:56 +1000 (EST) Cc: pbray@ind.tansu.com.au (Peter Bray) X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"Nwn3Q3.0.BM.BP8un"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1558 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Note: I'm not a member of any of the mailing lists Greetings, Can others reproduce this bug in zsh-3.0-pre2, where a command line environment variable is ignored in other functions called by the original functions. Very trivial double function calls seem to work fine but some where the code in "allLogicalHosts" seems to upset the second function call. This code has been stripped a bit but not completely, those wish to construct a similar directory structure, can or alternatively you can comment out the eval line and use the explicit variable set on the line below that in "allLogicalHosts". History: Early beta version of zsh-2.6 ( < beta-9 ?? ) worked but it was broken somewhere and fixed was introduced in beta-1X according to the changelogs, unfortunately I didn't have the time to test all the new beta versions Regards, Peter ------------------------------------------------------------------------------ Peter Bray: Intelligent Network Development Phone : (02) 395 3958 Network Technology Group - Telstra Fax : (02) 395 3225 Street : Lvl 9, Telecom Plaza, 320 Pitt St, Sydney Email : Mail : Locked Bag 6581, GPO Sydney, NSW, 1100 pbray@ind.tansu.com.au ------------------------------------------------------------------------------ Environment : SPARC Solaris 2.5 & 2.5.1 - zsh 3.0pre2 [pbray@swan] /tmp > du -k /tmp/tsaf 4 /tmp/tsaf/a@b/current 8 /tmp/tsaf/a@b 4 /tmp/tsaf/xxx@yyy/current 8 /tmp/tsaf/xxx@yyy 20 /tmp/tsaf [pbray@swan] /tmp > source /tmp/zshenv TSAF_VERBOSE --> echo Arguments --> a@b current TSAF_VERBOSE --> echo Arguments --> xxx@yyy current ############### ^^^^ why isn't this a ":" [pbray@swan] /tmp > cat /tmp/zshenv # # Example Directory Structure # ${prefix}/a@b/current # ${prefix}/a@b/backup # ${prefix}/xxx@yyy/current # ${prefix}/xxx@yyy/backup # setLogicalHost() { TSAF_VERBOSE=${TSAF_VERBOSE:-echo} echo "TSAF_VERBOSE --> ${TSAF_VERBOSE} Arguments --> $*" } allLogicalHosts() { prefix=/tmp/tsaf version=${1:-current} ## Comment out one off the two lines below eval 'hostList=`echo ${prefix}/*@*`' 2>/dev/null #hostList="a@b c@d" for logicalHost in `echo ${hostList}` do setLogicalHost `basename $logicalHost` ${version} done } TSAF_VERBOSE=: allLogicalHosts