zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: shebang consistency
Date: Wed, 12 Dec 2007 20:13:39 -0800	[thread overview]
Message-ID: <071212201339.ZM30779@torch.brasslantern.com> (raw)
In-Reply-To: <20071212233135.GA458@scowler.net>

On Dec 12,  6:31pm, Clint Adams wrote:
}
} Could we standardize on a single line so as to shorten the regex
} in my s/// ?

Well ...

#!/bin/env zsh  does not permit the possibility of adding the -f option,
so it's out.

Any other string needs to be edited to insert the local path to the
zsh binary, so for files that really are scripts it doesn't matter
what we start with, it'll be wrong as often as right.

I presume your s/// is doing what I'd otherwise suggest, which is that
"make install" fix up the #! line(s) when copying the files into place.
At that point it should be able to determine what the correct install
path for the binary would be.

(Why doesn't s:^#!.*[^ /]zsh:#!/bin/zsh: do the trick?  How much shorter
do you need to get?)

I guess I'd suggest standardizing on "#!/bin/zsh" plus options.

} Functions/Calendar/calendar_add:#!/bin/env zsh
} Functions/Example/cat:#! /usr/local/bin/zsh -f
} Functions/Example/zless:#!/usr/bin/zsh -f
} Functions/Misc/zkbd:#! /bin/zsh -f
} Functions/Misc/zcalc:#!/usr/local/bin/zsh -i
} Functions/Misc/checkmail:#! /usr/local/bin/zsh
} Functions/Misc/run-help:#!/usr/local/bin/zsh

Most of the files in Functions/ are not intended to be run as scripts
in any case, so the only reason for the #! line is so that clever
editors like vim and emacs can activate the correct syntax mode ...


  reply	other threads:[~2007-12-13  4:14 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 [this message]
2007-12-13  4:38   ` Clint Adams
2007-12-13  7:53     ` Stephane Chazelas
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=071212201339.ZM30779@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --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).