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 ms0.migadu.com with LMTPS id UMhJDDtOL2FuMwAAgWs5BA (envelope-from ) for ; Wed, 01 Sep 2021 11:56:11 +0200 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 2OFmBztOL2F2UwAAB5/wlQ (envelope-from ) for ; Wed, 01 Sep 2021 09:56:11 +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 D30EDC454 for ; Wed, 1 Sep 2021 11:56:10 +0200 (CEST) Received: from localhost ([::1]:47430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLMyX-0005Tr-UW for larch@yhetil.org; Wed, 01 Sep 2021 05:56:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLMyQ-0005Tj-HC for guix-patches@gnu.org; Wed, 01 Sep 2021 05:56:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53059) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mLMyQ-0004Mc-9K for guix-patches@gnu.org; Wed, 01 Sep 2021 05:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mLMyQ-00077i-45 for guix-patches@gnu.org; Wed, 01 Sep 2021 05:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50314] [PATCH 0/2] Add hint typo for importers and system actions Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Sep 2021 09:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50314 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50314@debbugs.gnu.org Cc: zimoun X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163049015927372 (code B ref -1); Wed, 01 Sep 2021 09:56:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 Sep 2021 09:55:59 +0000 Received: from localhost ([127.0.0.1]:36372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLMyN-00077O-3H for submit@debbugs.gnu.org; Wed, 01 Sep 2021 05:55:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:50838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLMyJ-00077F-4g for submit@debbugs.gnu.org; Wed, 01 Sep 2021 05:55:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLMyI-0005Ta-Sm for guix-patches@gnu.org; Wed, 01 Sep 2021 05:55:54 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:55984) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mLMyG-00049A-7F for guix-patches@gnu.org; Wed, 01 Sep 2021 05:55:54 -0400 Received: by mail-wm1-x32b.google.com with SMTP id g135so1422508wme.5 for ; Wed, 01 Sep 2021 02:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Q4Ica75LEdX1Jkmx63AhSSkvL4cJfthJTsV6aV//P0Q=; b=jesz4TTGlWDq5B0eCg7w91C+cfdoAVSvylBitJjeWCu0bsyTneZl9O3eLoJwGqoFmC lExdzeylwTvkEvPD6wEO4ZCnmN1Fw0nz3/gKI2rgzo6Y44JvKqWLQQBQnGmcvVjf4POk rdN4cYsGhjEl+CqGyodpOBHRwuQwOAtzDHMfG1a4Q65tDMNo0hY5rqvxY0dlWciTwhqD oWH4BhQio0om6qA51/Ie7My/jLs/7r0bjm2szcO8lGV280wXj8QV3OTRh5snlzEVniI3 6KULwSVc74P/y7MDFb27r2i/ONP5De86ORoBMCt7cto6lb/sGILWCuzjCfFE90IQO5Ud iL/w== 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=Q4Ica75LEdX1Jkmx63AhSSkvL4cJfthJTsV6aV//P0Q=; b=oZiXYDDuCcSqiF4OaPZFA03onYlg9vL09kkj4Vw3wAh1TipPZxRtSI0Cx//nZMQpxt 1jQKFHiAfUdILUhvy2PdM0nF8pvBtQH9WlZp881+CbCQ8JvqfndKYm8iWKjK2oSJwEHl k41evM5TTE5tHElYHAinZ548xttfD/+rtTbiaO2Nbfmrz3HkQkWwRYiUC+jK2cWlboeo 10J8cHAGCVf9rLzs8c8SX9le1tvCZcsWkLswd11uuTppl/gBsXlW8sqhk/s5vqkBKsqC ig7ll7CrX2Mne0aCdHNvuFXi99YUcfoL5d6J2JOoEEvqpZFdQ4XCod9kcsN0lqKR0xsh 0ETw== X-Gm-Message-State: AOAM533XIziXWFVzWB4gsCKuE8R31rVGDNd/cLCejmqsS2UHIYEdJsSN B/swo38vaZojcY6eJEDai+ZYb5PXn9QX+A== X-Google-Smtp-Source: ABdhPJzYUjLfLmA2xrww/WQPmYxOhsWFKpoSceVbk4N58lmFgH/DIGgmCHLA9VnxBhMc85UVIB8zzg== X-Received: by 2002:a1c:e912:: with SMTP id q18mr8882933wmc.21.1630490150475; Wed, 01 Sep 2021 02:55:50 -0700 (PDT) Received: from lili.univ-paris-diderot.fr ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id o5sm20607679wrw.17.2021.09.01.02.55.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Sep 2021 02:55:50 -0700 (PDT) From: zimoun Date: Wed, 1 Sep 2021 11:55:38 +0200 Message-Id: <20210901095538.12813-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630490171; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=Q4Ica75LEdX1Jkmx63AhSSkvL4cJfthJTsV6aV//P0Q=; b=RoJ67FmHmf1ikCPqnGqxR8zzCSrLRPxO809Kw4bncgRrPz7xO1iQYf8OT4stOs1LT5XWq3 p29WAo7Wtr5ZTB0IcxpfsCp09k5pYgWuItPiev0zAMpY22Gg3XK8YaZa0k+7+YeXn82WJk HfTxt2dI//fkEoZ6LP4spjxxjxzWOZxsEQMjs1YH4vgG9OU2It/pe9pt8oB2KNj47nTc0Y 3U1Sabd/LYvdcdy9600amST2atlHgXwfwCZJs3PHHMOJ5naIkmiv4s9vLgGWd337FNY6QM gu8+VJvm1i08a381bRSh/yST3Gq3iy2FAGynBUrK5oNnWjOS0U2nETrGb45CTw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630490171; a=rsa-sha256; cv=none; b=Z8yRf2EHld8+qfPFcB+HvmWES3Ge2a7hKyKtLxfyTq07ZZW1oDu0rUPVdNdlWnXhqxZWl8 SVrMZKUKvQkUL00adIUXyNhHmR3j/8nstFcgMhRv1Ujs9f+KTd9Jehi0SX9biIXKu8EdsS yzIZRh+eItoB4y1zmxN7AiqbIM7OwmQ9uyWn9OhVWMbfv9c7W4hswj6sJtCXaAQxkgMEfW FnVbfNPpZMTaQijZWVVivOpoDUHOEFPBoKbhm4afHBt3Bq8Z1TvseLLv5paDQ5WwOpg9oQ fJRqf51EeuC5miQ6MiTqTkb7cfIaNOjIKCxJICwu3ktwdqZxMJb6Yw+HkDJu7Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=jesz4TTG; 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-Spam-Score: 2.68 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=jesz4TTG; 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: D30EDC454 X-Spam-Score: 2.68 X-Migadu-Scanner: scn0.migadu.com X-TUID: Iy0ey2FRhiV+ Hi, Instead of, $ guix import pypy foo guix import: error: pypy: invalid importer it becomes $ ./pre-inst-env guix import pypy foo guix import: error: pypy: invalid importer hint: Did you mean `pypi'? And thanks to Sarah, the --options are also hinted (when typo). Note that it is not possible to guess which importer is between 'cpan' and 'cran' for the typo 'can'. The first from the list 'importers' is returned, i.e., 'cpan'. Last, instead of $ guix system sarch cuirass guix system: error: sarch: unknown action it becomes $ ./pre-inst-env guix system sarch cuirass guix system: error: sarch: unknown action hint: Did you mean `search'? All the best, simon zimoun (2): import: Add hint for importer typo. system: Add hint for action typo. guix/scripts/import.scm | 8 +++++++- guix/scripts/system.scm | 31 ++++++++++++++++++++----------- 2 files changed, 27 insertions(+), 12 deletions(-) base-commit: 1a657497acdead9afbeb24db6102f645d7e28ac9 -- 2.29.2