From: Geoff Wing <gwing@primenet.com.au>
To: jlf@essi.fr (Faraut Jean-Louis)
Cc: zsh-workers@math.gatech.edu
Subject: Re: zsh 3.0.1 bug
Date: Tue, 29 Oct 1996 10:25:16 +1100 (EST) [thread overview]
Message-ID: <199610282325.KAA05469@coral.primenet.com.au> (raw)
In-Reply-To: <199610281630.RAA05561@essi.essi.fr> from "Faraut Jean-Louis" at Oct 28, 96 05:30:06 pm
Faraut Jean-Louis wrote:
:I know of a workaround for this bug, but I would not like to edit everybody's
:.zshenv (700 persons) :-(
What you'd like is a global function directory which everyone can autoload
functions from. And autoload it from /etc/zshenv so people can use it in
their .zshenv files. How do they currently access it? Do they all have
their own copies of it?
:If this is a zsh bug, it would be nice to get a fix...
(This was introduced in 3.0.1-test2 (between Sept 3 & 23). I suspect it's
to do with Zoltan's changes to lex.c, but then, what do I know :-)
We'll let Zoltan clarify this.)
Here's a quick cleanup I did. There are a couple of other ways to do it and
I suspect there are a couple of unnecessary things in there, but ...
#!/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=""
TMPARRAY=$(eval echo '$'${2})
TMPARRAY=( ${(s/:/)=TMPARRAY} )
for i in $TMPARRAY
do
[ "$i" != $1 ] && TMPPATH=${TMPPATH}:$i
done
#remove leading colon
TMPPATH=${TMPPATH#:}
#return result
eval ${2}=${TMPPATH}
return 0
--
Geoff Wing [gwing@primenet.com.au] PrimeNet - Internet Consultancy
Web : http://www.primenet.com.au/ Phone : +61-3-9818 2977
Mobile: 0412 162 441 Facsimile: +61-3-9819 3788
next prev parent reply other threads:[~1996-10-28 23:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-10-28 16:30 Faraut Jean-Louis
1996-10-28 23:25 ` Geoff Wing [this message]
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=199610282325.KAA05469@coral.primenet.com.au \
--to=gwing@primenet.com.au \
--cc=jlf@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).