zsh-workers
 help / color / mirror / code / Atom feed
* zsh 3.0.1 bug
@ 1996-10-28 16:30 Faraut Jean-Louis
  1996-10-28 23:25 ` Geoff Wing
  0 siblings, 1 reply; 3+ messages in thread
From: Faraut Jean-Louis @ 1996-10-28 16:30 UTC (permalink / raw)
  To: zsh-workers; +Cc: jlf

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)




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

end of thread, other threads:[~1996-10-29  7:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-10-28 16:30 zsh 3.0.1 bug Faraut Jean-Louis
1996-10-28 23:25 ` Geoff Wing
1996-10-29  2:01   ` 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).