zsh-workers
 help / color / mirror / code / Atom feed
From: Faraut Jean-Louis <jlf@essi.fr>
To: zsh-workers@math.gatech.edu
Cc: jlf@essi.essi.fr
Subject: zsh 3.0.1 bug
Date: Mon, 28 Oct 1996 17:30:06 +0100	[thread overview]
Message-ID: <199610281630.RAA05561@essi.essi.fr> (raw)

Hi!
here at essi.fr we are a zsh site as we have adopted this shell since its 
creation by P. Falstad...
Now I have a little problem...
Just upgraded to 3.0.1 and the following function that we used for years gets 
suddenly broken.
This is rather annoying because everybody here has this function in its zsh 
environment...

------------------------------------------------------
#!/usr/bin/zsh
#zsh function to delete some dir to PATHS variables
#Author: jlf@essi.fr 
#	 Ecole Sup'erieure en Sciences Informatiques
#	 Sophia-Antipolis France
#Usage: undepend /some/dir PATH_VARIABLE
#Example: undepend /usr/openwin/bin PATH
#	  delete any occurrences of /usr/openwin/bin in $PATH
#
#Check usage
if [ $# -ne 2 ]
then 
     echo 'Usage: undepend /some/dir PATH_VARIABLE' 2>&1
     return 1
fi
#scan dirs
TMPPATH=""
eval TMPARRAY=\$$2
TMPARRAY=`echo ${(s/:/)TMPARRAY}`
setopt shwordsplit
for i in $TMPARRAY
do
	[ "$i" \!= $1 ] && TMPPATH=${TMPPATH}:$i
done
#remove leading colon
TMPPATH=${TMPPATH#:}
#return result
################################################################
${2}=`echo $TMPPATH`
#^^^this line works till zsh3.0.0 and does not work anymore with zsh3.0.1
################################################################
#eval echo \$$2
return 0
--------------------------------------------------------
I know of a workaround for this bug, but I would not like to edit everybody's 
.zshenv (700 persons) :-(
the workaround:
replace 
${2}=`echo $TMPPATH`
by
read $2 <<EOF
$TMPPATH
EOF
If this is a zsh bug, it would be nice to get a fix...

PLEASE ANSWER BY E-MAIL ONLY I'M NOT SUBSCRIBED TO THIS LIST

thanks in advance

-- 
			[jlf]	Tel.  04 92 96 50 50
	Jean-Louis Faraut (jlf@essi.fr) Responsable Informatique de l'ESSI
Ecole Superieure en Sciences Informatiques, Sophia-Antipolis (France)




             reply	other threads:[~1996-10-28 16:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-10-28 16:30 Faraut Jean-Louis [this message]
1996-10-28 23:25 ` Geoff Wing
1996-10-29  2:01   ` 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=199610281630.RAA05561@essi.essi.fr \
    --to=jlf@essi.fr \
    --cc=jlf@essi.essi.fr \
    --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).