Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: shebang consistency
- X-seq: zsh-workers 24221
- From: Stephane Chazelas <stephane_chazelas@xxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: shebang consistency
- Date: Thu, 13 Dec 2007 07:53:48 +0000
- In-reply-to: <20071213043806.GA12881@xxxxxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20071212233135.GA458@xxxxxxxxxxx> <071212201339.ZM30779@xxxxxxxxxxxxxxxxxxxxxx> <20071213043806.GA12881@xxxxxxxxxxx>
On Wed, Dec 12, 2007 at 11:38:06PM -0500, Clint Adams wrote:
> On Wed, Dec 12, 2007 at 08:13:39PM -0800, Bart Schaefer wrote:
> > (Why doesn't s:^#!.*[^ /]zsh:#!/bin/zsh: do the trick? How much shorter
> > do you need to get?)
>
> Probably that out-of-place caret. I wasn't handling the env case,
> (and I don't have env in /bin), so I was thinking it would be nice to just
> have a single string to match.
env seems to consistently be in /usr/bin. I think there are very
few exceptions to that accross unices.
To make the change only on the first line:
sed -e '1!b' -e 's:^#![[:blank:]]*[^[:blank:]]*zsh:#! /bin/zsh:'
> > I guess I'd suggest standardizing on "#!/bin/zsh" plus options.
>
> Works for me.
I like:
#! /bin/zsh --
better meself, not that it makes a lot of difference, except to
the eye and for the double-click-copy-paste or vi's W/E motions.
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author