From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id aCTVB8x8HGDWGgAA0tVLHw (envelope-from ) for ; Thu, 04 Feb 2021 23:01:32 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id EH6bA8x8HGBPcwAAB5/wlQ (envelope-from ) for ; Thu, 04 Feb 2021 23:01:32 +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 9D184940466 for ; Thu, 4 Feb 2021 23:01:31 +0000 (UTC) Received: from localhost ([::1]:33084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7ncv-0006Pb-Lb for larch@yhetil.org; Thu, 04 Feb 2021 18:01:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7ncU-0006PI-CS for guix-patches@gnu.org; Thu, 04 Feb 2021 18:01:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59120) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l7ncT-0002LB-VU for guix-patches@gnu.org; Thu, 04 Feb 2021 18:01:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l7ncT-0007NL-SP for guix-patches@gnu.org; Thu, 04 Feb 2021 18:01:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46308] [PATCH 0/1] Fix 2 corner cases for option hint Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 04 Feb 2021 23:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46308 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 46308@debbugs.gnu.org Cc: zimoun X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161247964528318 (code B ref -1); Thu, 04 Feb 2021 23:01:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 Feb 2021 23:00:45 +0000 Received: from localhost ([127.0.0.1]:42433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7ncC-0007Mf-OC for submit@debbugs.gnu.org; Thu, 04 Feb 2021 18:00:45 -0500 Received: from lists.gnu.org ([209.51.188.17]:55452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7ncA-0007MX-E1 for submit@debbugs.gnu.org; Thu, 04 Feb 2021 18:00:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43084) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7ncA-0006JI-0U for guix-patches@gnu.org; Thu, 04 Feb 2021 18:00:42 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:37995) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l7nc7-00025n-2v for guix-patches@gnu.org; Thu, 04 Feb 2021 18:00:41 -0500 Received: by mail-wm1-x32b.google.com with SMTP id y187so4412212wmd.3 for ; Thu, 04 Feb 2021 15:00:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t7L1qnHOlPaDly9ceJ5Dr+vYe26yhEcYeWwkLN/vyp4=; b=ZeO5CL2ZvqKA6daep9JL1KrJAMvsCoSb74HUcY4Nf2Jx7aADbgU8zSCtjAxSUvRSZX oAcE2nrsUOklx7/MYyBRcVFUyo7LQf2uuR6IF5aVzXUnjWJyBX0/w/iom2QbwNryQDAO zZgzk3CqUcqdxPD6S4vJujFiVTRqWK8PjGLUi5J5W3eP7jGtX+oGarC8d225Fv0MhNT7 3IsyIY4nspTdu/lJxGVl1jYX0FSUJbsLvI4s7WVtAwPydmvqhRqBqmUoQe+h5OrICSX4 HX73JjHu4nPc81gOBUH6ZeASVaW6u3gFpuwdcXpFZHNyN6puqE2J38iMrRxF76iDR0zc ZDRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t7L1qnHOlPaDly9ceJ5Dr+vYe26yhEcYeWwkLN/vyp4=; b=rWpQWG88Zqj1RpG/i2aMm/ZYBxp1oDL/xAYNLVatHQqW6/hmak7cAaV5mBkOFjkzii Ys4fupPfdCWyVBVdLNyCdWyKN/cOee94BxCKw3qgrGRiT3wxCUIdnwBX19k0IDihA+OY H1zdAYc7L/FGmEKtEVqrg8I2UojifRFX3d8yzqvA5mb42tATeSzTzkBabZ1aDZiRn+yq MKx2IjCjeb5VpP1oQqhpGa6EFspIELugmcXzAc029dh3q1lUvwUemqRYqTDFQhANdnRf lEuX45RYqBPQ0xA1JC2wihJXvdWZr5ZgDW9TNDRJKZ5JmVQSYbKg/IfqCSaUYlGYZDjV q9ZA== X-Gm-Message-State: AOAM531aWOu07o0boi4yXi/O10/IzM93YbASEwRglUTEkrn3yQwWd8LE 62nYvHCY1Gh5WRpeAyVMPyppA+MqcXk= X-Google-Smtp-Source: ABdhPJzJC3X0usEz+qd7Uxf4PqKf2pY9ELqZFPj1azeIEbyJu+xvHjZkm9y0En6QtXhIJvgGlGOH9Q== X-Received: by 2002:a05:600c:4e91:: with SMTP id f17mr1114820wmq.142.1612479637430; Thu, 04 Feb 2021 15:00:37 -0800 (PST) Received: from lili.univ-paris-diderot.fr ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id n9sm10280907wrq.41.2021.02.04.15.00.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 15:00:37 -0800 (PST) From: zimoun Date: Fri, 5 Feb 2021 00:00:28 +0100 Message-Id: <20210204230028.2275-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 0.25 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=ZeO5CL2Z; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 9D184940466 X-Spam-Score: 0.25 X-Migadu-Scanner: scn1.migadu.com X-TUID: 32CNMlc4PEtj Hi, First, --8<---------------cut here---------------start------------->8--- $ guix package --shw=hello guix package: error: shw=hello: unrecognized option --8<---------------cut here---------------end--------------->8--- becomes --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix package --shw=hello guix package: error: shw=hello: unrecognized option hint: Did you mean `show'? --8<---------------cut here---------------end--------------->8--- And second the ugly (introduced by ’option’hint): --8<---------------cut here---------------start------------->8--- $ guix package -Z Backtrace: 11 (primitive-load "/home/simon/.config/guix/current/bin/guix") In guix/ui.scm: 2162:12 10 (run-guix-command _ . _) In guix/scripts/package.scm: 1075:2 9 (guix-package . _) In ice-9/boot-9.scm: 1731:15 8 (with-exception-handler # _ # _ …) In srfi/srfi-37.scm: 113:18 7 (next-arg) In unknown file: 6 (_ # # #) In guix/scripts.scm: 121:2 5 (_ _ #\Z _ . _) In guix/utils.scm: 920:4 4 (string-closest _ _ #:threshold _) In guix/combinators.scm: 46:26 3 (fold2 # #f # (…)) In guix/utils.scm: 921:25 2 (_ "help" #f +inf.0) 911:12 1 (string-distance #\Z "help") In unknown file: 0 (string->list #\Z # #) ERROR: In procedure string->list: In procedure string->list: Wrong type argument in position 1 (expecting string): #\Z --8<---------------cut here---------------end--------------->8--- is fixed: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix package -Z guix package: error: Z: unrecognized option --8<---------------cut here---------------end--------------->8--- A corner case is still missing: $ ./pre-inst-env guix environment -ah-hoc hello guix environment: error: a: unrecognized option where it could be nice to hint for. But from my understanding, it is not possible with SRFI-37. All the best, simon zimoun (1): guix: scripts: Fix corner cases of hint for option typo. guix/scripts.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) base-commit: 5ae09d7979a0696d862b9555314eab199f7ce576 -- 2.29.2