From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sESjHCr0imFTZQAAgWs5BA (envelope-from ) for ; Tue, 09 Nov 2021 23:20:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 8M8sGCr0imG7JwAA1q6Kng (envelope-from ) for ; Tue, 09 Nov 2021 22:20:26 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1F75CE0C2 for ; Tue, 9 Nov 2021 23:20:26 +0100 (CET) Received: from localhost ([::1]:59056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mkZTc-0004cx-Ni for larch@yhetil.org; Tue, 09 Nov 2021 17:20:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkZTR-0004ci-TD for guix-devel@gnu.org; Tue, 09 Nov 2021 17:20:13 -0500 Received: from zancanaro.com.au ([45.76.117.151]:38522) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkZTP-0001I6-Vk; Tue, 09 Nov 2021 17:20:13 -0500 Received: by zancanaro.com.au (Postfix, from userid 116) id 8C3B835F06; Tue, 9 Nov 2021 22:20:05 +0000 (UTC) Received: from golem (n114-78-12-98.bla3.nsw.optusnet.com.au [114.78.12.98]) by zancanaro.com.au (Postfix) with ESMTPSA id 07D3435F04; Tue, 9 Nov 2021 22:20:05 +0000 (UTC) References: <87czn9i6sk.fsf@gnu.org> User-agent: mu4e 1.6.9; emacs 27.2 From: Carlo Zancanaro To: Jacob Hrbek Subject: Re: Unable to define shebang for guix shell file Date: Wed, 10 Nov 2021 09:14:20 +1100 In-reply-to: Message-ID: <878rxxm0ow.fsf@zancanaro.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=45.76.117.151; envelope-from=carlo@zancanaro.id.au; helo=zancanaro.com.au X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636496426; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=0QoDuT5gDSkAdpVy9jgbnqox11vZGoBY5cw9UzwubPs=; b=fhX3g80yOt4xbi+mNiyrRO6Y1qpUsdKwVQQEeiuyxC7xkEYRKHfwXGRrSo0RHtqjuB7CoR kaL3teRUFYRF89U9s0d8YyDPQDXX3v+j++GDBy2vEJT40AGuGnXN+Olht+hv/A2zQTW9fg 3bdodqnzrkWVmHHWZuFpJfrnRIH7Lp2p6Zl4rXdlI7qTTaXbIFc32I19UfM9x60K5hmgJy ugfNjDYaHLk4oKhCxfPjCOV87kuWigBayFP+YgNYRR8wO1T1MAgP3IzPvobnh0ACKc03Ob DxTgzsK6TMtVdU/nzLCtxL7rmbHmC4XCbsRFGxJz9sda7ZEh4tGVZ9CHUbL87w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636496426; a=rsa-sha256; cv=none; b=M1FXGerob6MerXm+TvJhOuw2SpAqZnwHmnXu8nFiSaz0eZ9JZ3snxX91mDoITDx0JOv3kF XF7FmPQkn/bNzD7hHVgGVhmZ6mHNhauSkwzadfB9/14zdFn4NlTvJcwOpjr1gvGBydzKUf LQ5dB7P18DiZPbCsKbl6l7Iw1abz1AGGbMVN5zhdneLGsAO8pYZilgwWjzU5RztPY9vK/T oViU7W6EUXgxXwQIGnTP9oQQA5nCn3gZVESVv6OqHBaedLTmxhfSRSEIORrmh/WEsh74zf XQdW3fHtG9rKDFdeumzlIlgfOXKdAAr8GWZocIlO+YmXK8YtOPJMtXLx8lnB2A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=zancanaro.id.au (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -2.72 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=zancanaro.id.au (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 1F75CE0C2 X-Spam-Score: -2.72 X-Migadu-Scanner: scn1.migadu.com X-TUID: D7xiGa36DcYX Hey Jacob, On Tue, Nov 09 2021, Jacob Hrbek wrote: >> For now I use =E2=80=9C#!/usr/bin/env -S guix shell --=E2=80=9D, which w= orks=20 >> well enough for me. How does that sound? -- ludo@gnu.org > > Not a solution as (AFIAK) POSIX only accepts one argument. That's the point of the -S. It passes the entire rest of the line=20 as a single argument to /usr/bin/env, which reads it as a single=20 -S argument which /usr/bin/env then interprets as a command with=20 arguments. Something like how this doesn't work: $ /usr/bin/env 'echo hello' /usr/bin/env: =E2=80=98echo hello=E2=80=99: No such file or directory /usr/bin/env: use -[v]S to pass options in shebang lines But this does: $ /usr/bin/env '-S echo hello' hello It looks like this was added to coreutils in 2018 in version 8.30.=20 I wasn't aware of this feature until seeing Ludo's email, but it=20 seems like a neat solution to the problem. Carlo