From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: #!/usr/bin/env perl Date: Sat, 23 Feb 2013 01:03:21 +0100 Message-ID: <201302230103.21985.andreas@enge.fr> References: <201301262131.48844.andreas@enge.fr> <201302222313.25004.andreas@enge.fr> <87ehg87wx3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U92aS-0004eT-7K for bug-guix@gnu.org; Fri, 22 Feb 2013 19:03:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U92aM-0000NK-SV for bug-guix@gnu.org; Fri, 22 Feb 2013 19:03:32 -0500 In-Reply-To: <87ehg87wx3.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: bug-guix@gnu.org Am Samstag, 23. Februar 2013 schrieb Ludovic Court=C3=A8s: > > (make-regexp > > "^[[:blank:]]*([[:graph:]]+)[[:blank:]]*([[:graph:]]*)(.*)$"))) >=20 > I think it should be a + after the second [[:blank:]], because there > should be space between the interpreter name and its argument. Sometimes, there is no space at all: In #!/usr/bin/perl for instance, when there is no argument. Then the "+" version would fail.=20 With "*", it works as expected. > What about more descriptive names like =E2=80=98interp=E2=80=99, =E2=80= =98arg1=E2=80=99, and =E2=80=98rest=E2=80=99? Maybe. I did not choose descriptive names because the real interpreter is=20 sometimes the first, sometimes the second piece. But your suggestion looks= =20 good. > Rather (has-env? (string-suffix? "/env" interp)). Ok, thanks. > > + (if has-env > > + (begin > Please align with the =E2=80=98h=E2=80=99 here... > > + (patch p bin > > + (string-append " " second > > third))))) > ... and with the =E2=80=98p=E2=80=99 here. Ok. The annoying thing with this way of indenting is that lines become very= =20 long very quickly; I like keeping them at less than 80 characters. Andreas