From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5578 invoked by alias); 30 Jan 2010 00:37:13 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27643 Received: (qmail 23734 invoked from network); 30 Jan 2010 00:37:02 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <100129163645.ZM9106@torch.brasslantern.com> Date: Fri, 29 Jan 2010 16:36:45 -0800 In-reply-to: <25809.1264802076@pws-pc> Comments: In reply to Peter Stephenson "PATCH: installing executable functions" (Jan 29, 9:54pm) References: <25809.1264802076@pws-pc> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org (Zsh hackers list) Subject: Re: PATCH: installing executable functions MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jan 29, 9:54pm, Peter Stephenson wrote: } } ("sed -ne '1p'" is in case there's some ghastliness where "head -1" is } broken as has occasionally been observed with "tail -1".) } } The biggest disadvantage here is this could make function installation } on some systems, notably Cygwin, even more interminable. Perhaps this would be faster? if test -n "`sed -ne 2q -e '/^#!/p' $sdir_top/$file`"; then } + if sed -ne '1p' $sdir_top/$file | grep '^#!' >/dev/null; then