zsh-workers
 help / color / mirror / code / Atom feed
From: Stephane Chazelas <stephane_chazelas@yahoo.fr>
To: zsh-workers@sunsite.dk
Subject: Re: shebang consistency
Date: Thu, 13 Dec 2007 07:53:48 +0000	[thread overview]
Message-ID: <chaz20071213075345.GA7269@artesyncp.com> (raw)
In-Reply-To: <20071213043806.GA12881@scowler.net>

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


  reply	other threads:[~2007-12-13  7:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-12 23:31 Clint Adams
2007-12-13  4:13 ` Bart Schaefer
2007-12-13  4:38   ` Clint Adams
2007-12-13  7:53     ` Stephane Chazelas [this message]
2007-12-13 21:12     ` Peter Stephenson
2007-12-13 22:12       ` Clint Adams

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=chaz20071213075345.GA7269@artesyncp.com \
    --to=stephane_chazelas@yahoo.fr \
    --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).