From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28261 invoked from network); 15 Aug 2001 17:00:29 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 Aug 2001 17:00:29 -0000 Received: (qmail 1252 invoked by alias); 15 Aug 2001 17:00:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15632 Received: (qmail 1221 invoked from network); 15 Aug 2001 17:00:12 -0000 From: Bart Schaefer Message-Id: <1010815165958.ZM10425@candle.brasslantern.com> Date: Wed, 15 Aug 2001 16:59:58 +0000 In-Reply-To: <20010815155420.A14031@thelonious.new.ox.ac.uk> Comments: In reply to Adam Spiers "Re: /usr/local/bin/perl" (Aug 15, 3:54pm) References: <20010327142836.C32602@thelonious.new.ox.ac.uk> <1010327181943.ZM14188@candle.brasslantern.com> <20010327151711.94655.qmail@web9306.mail.yahoo.com> <20010815155420.A14031@thelonious.new.ox.ac.uk> X-Mailer: Z-Mail (5.0.0 30July97) To: Adam Spiers , zsh-workers@sunsite.dk Subject: Re: /usr/local/bin/perl MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Aug 15, 3:54pm, Adam Spiers wrote: } } > } Test/ztst.zsh : #!/usr/local/bin/zsh -f } > } > That should be ".../zsh -f +Z". } } Indeed, and I believe that I've had tests misleadingly fail through } running `make test' before `make install' as a result of that. You shouldn't have. `make test' explicitly calls zsh by full path and passes it ztst.zsh by name. You might have had failures trying to run tests by hand with ./ztst.zsh B01cd.ztst or some such, but the "right" way to do that is make test TESTNUM=B01 } Shall I change it then? I'm not sure it'll help, as many OSs won't accept more than one argument after the command path when interpreting a #! line. (That's likely why you are having trouble with `env perl -w'.) } > If you put env in the #! line -- or put the #! line anywhere but as the } > first line in the script -- it foils emacs' algorithm for figuring out } > which mode to start in. Same issue if you put some kind of @...@ thing } > for configure there. Not that this should be the primary reason for any } > decision that we make, but at least consider it. } } We can persuade emacs to use the right mode using the other method: } } # Local Variables: } # mode:cperl } # End: } } should do it. Please don't. I find it aesthetically displeasing to have that cruft at the end of every file, and I hate having emacs stop during file load to ask whether it should pay attention to it, and it's not secure to simply always accept it. I'd rather just type M-x cperl-mode if emacs has got it wrong. } If we use configure, presumably that would mean having (say) } Utils/helpfiles auto-generated from Utils/helpfiles.in? My vote is } for that option. Yes, that would be it, but my vote is still to avoid mucking with this in configure. Maybe something like the following, run through the just-compiled zsh? --- 8< --- snip --- 8< --- # Src/zsh -f path_to_this_file path_to_file_to_fix ${bindir} setopt nobanghist command=( $(sed -n -e '1s/^#!//p' $1) ) if [[ -n "$command" ]]; then if [[ ${command[1]:t} == zsh ]]; then command[1]=$2/zsh else command[1]=$(whence -p ${command[1]:t}) fi if [[ -n "$command[1]" ]]; then echo "#!$command" > $1.fix && sed -e 1d $1 >> $1.fix && mv $1 $1.orig && mv $1.fix $1 fi fi --- 8< --- snip --- 8< --- -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net