From: Bart Schaefer <schaefer@brasslantern.com>
To: Adam Spiers <adam@spiers.net>, zsh-workers@sunsite.dk
Subject: Re: /usr/local/bin/perl
Date: Wed, 15 Aug 2001 16:59:58 +0000 [thread overview]
Message-ID: <1010815165958.ZM10425@candle.brasslantern.com> (raw)
In-Reply-To: <20010815155420.A14031@thelonious.new.ox.ac.uk>
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
next prev parent reply other threads:[~2001-08-15 17:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-27 13:28 /usr/local/bin/perl Adam Spiers
2001-03-27 15:17 ` /usr/local/bin/perl Oliver Kiddle
2001-08-15 14:54 ` /usr/local/bin/perl Adam Spiers
2001-08-15 16:59 ` Bart Schaefer [this message]
2001-08-16 14:12 ` /usr/local/bin/perl Adam Spiers
2001-08-16 20:52 ` /usr/local/bin/perl Bart Schaefer
2001-03-27 18:19 ` /usr/local/bin/perl Bart Schaefer
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=1010815165958.ZM10425@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=adam@spiers.net \
--cc=zsh-workers@sunsite.dk \
/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).