From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id aD+iLir8EmSG9gAASxT56A (envelope-from ) for ; Thu, 16 Mar 2023 12:23:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id WImkLir8EmScwgAA9RJhRA (envelope-from ) for ; Thu, 16 Mar 2023 12:23:22 +0100 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 82708D992 for ; Thu, 16 Mar 2023 12:23:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pclhK-0001Ek-EJ; Thu, 16 Mar 2023 07:23:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pclhH-0001AT-Rw for guix-patches@gnu.org; Thu, 16 Mar 2023 07:23:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pclhG-0007hT-Mr for guix-patches@gnu.org; Thu, 16 Mar 2023 07:23:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pclhG-0002EF-6w for guix-patches@gnu.org; Thu, 16 Mar 2023 07:23:02 -0400 Subject: bug#61094: [PATCH] doc: Document 'shebang' for 'guix shell'. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Thu, 16 Mar 2023 11:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 61094 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Simon Tournier Cc: 61094-done@debbugs.gnu.org Mail-Followup-To: 61094@debbugs.gnu.org, ludo@gnu.org, zimon.toutoune@gmail.com Received: via spool by 61094-done@debbugs.gnu.org id=D61094.16789657338493 (code D ref 61094); Thu, 16 Mar 2023 11:23:01 +0000 Received: (at 61094-done) by debbugs.gnu.org; 16 Mar 2023 11:22:13 +0000 Received: from localhost ([127.0.0.1]:41371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pclgT-0002Cv-AN for submit@debbugs.gnu.org; Thu, 16 Mar 2023 07:22:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pclgO-0002Cc-2Q for 61094-done@debbugs.gnu.org; Thu, 16 Mar 2023 07:22:11 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pclgI-0007ao-PW; Thu, 16 Mar 2023 07:22:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=mWX1RbfGd5d8tUXV5jzkDo0S+JjU0NyY+KILlPXDQTw=; b=AEePgdH1incquDCAllyU 0XaUwUyzlxtXoKTKpG8lj+q0JpQRiBPsNe/8qy33Zi+8gF4ITgimlrcLaJrj9/a7lvZRIdsjSMgZ0 HUJPodTNy75LvbPuYT0S6vihGH2ziWF1M5gYPj9WrWfob2zXB3allAzX0233kXm214xWy3Oa7a5Dd rbIwjYcnSj112lkR0wB++jZyGK70GX2lVGMzH4czmea4NRdH9i2EexK4YqJ0xV/DFcmcHCJD0T/PN q9TacBrlHqsNxQa61w25IvQBjLyfrVX7l7Edl0iWGWHyj8mW0VCrmNMRdOFVdVKIZz1GvaSgHVaIS Q0h+ViepkfsFvw==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pclgH-0000mM-2E; Thu, 16 Mar 2023 07:22:02 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20230127111237.2910126-1-zimon.toutoune@gmail.com> Date: Thu, 16 Mar 2023 12:21:59 +0100 In-Reply-To: <20230127111237.2910126-1-zimon.toutoune@gmail.com> (Simon Tournier's message of "Fri, 27 Jan 2023 12:12:37 +0100") Message-ID: <87v8j1eyaw.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=AEePgdH1; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678965802; a=rsa-sha256; cv=none; b=TfInwcQtaUJj683rLJjPeXai3w5nv6o5ygJBpjzWsXull4J37i9TscTqwpCmSVR7X2C8pv no/5J8s46wyrJXctcn9YfvWtYRI0Dopld8FvC1RbrxTzopBHjiOKEfqDAwZJTwv8vc5F3h 0WFspp0rFkNm66PUNmJD7nohoUaTmyDi8uzozgDUQs2ieCmRVM0MlRxM77VQnwumMD9Rmt b1PGvpJdxL3/v9TRMMODE6rvVxItT8UUtaUBoWL9J99XLAXs/VcOQadjylm0rKjKCxx9BQ Femo8a13VhuPSRtVtpyCXBkYbcIxfBM0F6+lg/smafoPh6eMToXoyxaY7bEHvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678965802; 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:resent-to:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=mWX1RbfGd5d8tUXV5jzkDo0S+JjU0NyY+KILlPXDQTw=; b=ii8JZ5yTLLarLH9ddG+5CAzxYQDuB/ZAoRGMGA9Wkk21l/3UIpoNo+XP69gcWIJz3FpqL4 0nr6YU4siUjNBhreDyHEvD4KnFOo9WTuGD4tvHzUQuRG2XeaZjfifBoR64cTQE48GCy9dd ictK1pSrxYbHzLwjJS5hoL8M4DwV7K8otoxr1/RGJ9sEwRguonV95OqKhv+4NqbOARcx1c Y5U6BhYfyCVb6e7ReGV0PexnWNBHIopwpYyTZAmrJcsiF3nw5KxrQ8GOBA+7wTWbjplwc4 j8+VprBjivzL3B9TJSN3u5Ij64Zhn6fBzATtOi80aoo6hnFBKYaBV1GNPkoGNw== X-Migadu-Spam-Score: -3.14 X-Spam-Score: -3.14 X-Migadu-Queue-Id: 82708D992 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=AEePgdH1; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-TUID: z5inKlbuzQPg --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Simon, Simon Tournier skribis: > * doc/guix.texi (Invoking guix shell): Add a note mentioning how to use > 'shebang'. Applied with the changes below.=20=20 Thanks! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/doc/guix.texi b/doc/guix.texi index 9c1fc04265..aa98d7df4b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -5940,16 +5940,19 @@ guix shell python python-numpy -- python3 @end example @quotation Note -@cindex shebang -@command{guix shell} can be used as @emph{shebang}. Consider the -previous example as an executable Python script, the @emph{shebang} -reads, +@cindex shebang, for @command{guix shell} +@command{guix shell} can be also be used as a script interpreter, also +known as @dfn{shebang}. Here is an example self-contained Python script +making use of this feature: @example -#!/usr/bin/env -S guix shell python python-nympy -- python3 +#!/usr/bin/env -S guix shell python python-numpy -- python3 +import numpy +print("This is numpy", numpy.version.version) @end example -All the @var{options} or convenience of @command{guix shell} apply. +You may pass any @command{guix shell} option, but there's one caveat: +the Linux kernel has a limit of 127 bytes on shebang length. @end quotation Development environments can be created as in the example below, which --=-=-=--