From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-request@euclid.skiles.gatech.edu Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id DAA03941 for ; Tue, 29 Oct 1996 03:44:13 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id LAA12131; Mon, 28 Oct 1996 11:30:51 -0500 (EST) Resent-Date: Mon, 28 Oct 1996 11:30:51 -0500 (EST) Message-Id: <199610281630.RAA05561@essi.essi.fr> X-Mailer: exmh version 1.6.9 8/22/96 To: zsh-workers@math.gatech.edu cc: jlf@essi.essi.fr Subject: zsh 3.0.1 bug Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 28 Oct 1996 17:30:06 +0100 From: Faraut Jean-Louis Resent-Message-ID: <"bU7CR.0.Nz2.w-DTo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2288 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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 <