zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Bray <pbray@ind.tansu.com.au>
To: zsh-workers@math.gatech.edu
Cc: pbray@ind.tansu.com.au (Peter Bray)
Subject: Bug Report: Env Vars and shell functions
Date: Mon, 8 Jul 1996 13:49:56 +1000 (EST)	[thread overview]
Message-ID: <199607080349.NAA20085@cod.ind.tansu.com.au> (raw)


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



             reply	other threads:[~1996-07-08  4:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-08  3:49 Peter Bray [this message]
1996-07-08  8:58 ` Bart Schaefer
1996-07-08 12:49   ` Peter Stephenson
1996-07-10  2:33     ` Zoltan Hidvegi
1996-07-10 12:19       ` Vinnie Shelton
1996-07-10 13:45         ` Zoltan Hidvegi
1996-07-11 22:11           ` Anthony Heading
1996-07-12 12:17             ` Peter Stephenson
1996-07-12 15:27             ` Zoltan Hidvegi
1996-07-12 16:01               ` Anthony Heading
1996-07-12 17:18               ` Bart Schaefer
1996-07-12 17:43                 ` Zoltan Hidvegi

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=199607080349.NAA20085@cod.ind.tansu.com.au \
    --to=pbray@ind.tansu.com.au \
    --cc=zsh-workers@math.gatech.edu \
    /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).