zsh-workers
 help / color / mirror / code / Atom feed
* Bug Report: Env Vars and shell functions
@ 1996-07-08  3:49 Peter Bray
  1996-07-08  8:58 ` Bart Schaefer
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Bray @ 1996-07-08  3:49 UTC (permalink / raw)
  To: zsh-workers; +Cc: Peter Bray


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



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~1996-07-12 17:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-08  3:49 Bug Report: Env Vars and shell functions Peter Bray
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

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).