From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id h/lbEvTzul7bVgAA0tVLHw (envelope-from ) for ; Tue, 12 May 2020 19:07: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 mp1 with LMTPS id eCyUKwL0ul73bQAAbx9fmQ (envelope-from ) for ; Tue, 12 May 2020 19:07:46 +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 1C3D69400AF for ; Tue, 12 May 2020 19:07:44 +0000 (UTC) Received: from localhost ([::1]:46956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYaFl-0003bR-0d for larch@yhetil.org; Tue, 12 May 2020 15:07:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYaFc-0003az-8s for guix-devel@gnu.org; Tue, 12 May 2020 15:07:36 -0400 Received: from mail-40131.protonmail.ch ([185.70.40.131]:48434) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYaFX-000557-CT for guix-devel@gnu.org; Tue, 12 May 2020 15:07:35 -0400 Date: Tue, 12 May 2020 19:07:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elenq.tech; s=protonmail; t=1589310445; bh=iqo+V8sqMVqEccBqo0NTtWg1H0fPEUNX+p95ruVvEAE=; h=Date:To:From:Reply-To:Subject:From; b=KiVyTt4OtU8y9xJDoGeiNWeeV7Fl97xDIPcAcD4iyzK66AQwZFN0tDypKUtvjA5E2 2ak2O9pWHDxYHyYvcWhRJaVaK+zl9zo9ruI3MPKlbdNS12OX8ciVPSFo1aV2JcDFWN XHcrnPsbSlmUXeF77nofU4tL04g+bdbK6yOIARi4= To: "guix-devel\\@gnu.org" From: Ekaitz Zarraga Subject: guix describe user experience improvement proposition Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.131; envelope-from=ekaitz@elenq.tech; helo=mail-40131.protonmail.ch X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/12 15:07:26 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Ekaitz Zarraga Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 X-Spam-Score: -1.71 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=elenq.tech header.s=protonmail header.b=KiVyTt4O; dmarc=pass (policy=none) header.from=elenq.tech; 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-Scan-Result: default: False [-1.71 / 13.00]; HAS_REPLYTO(0.00)[ekaitz@elenq.tech]; GENERIC_REPUTATION(0.00)[-0.53990285125141]; DWL_DNSWL_FAIL(0.00)[209.51.188.17:server fail,elenq.tech:server fail]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.06), country: US(-0.00), ip: 209.51.188.17(-0.54)]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[elenq.tech:+]; DMARC_POLICY_ALLOW(-0.50)[elenq.tech,none]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[larch=yhetil.org]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[elenq.tech:s=protonmail]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; URIBL_BLOCKED(0.00)[elenq.tech:dkim]; FROM_NEQ_ENVFROM(0.00)[ekaitz@elenq.tech,guix-devel-bounces@gnu.org]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; DNSWL_BLOCKED(0.00)[209.51.188.17:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.51.188.17:from]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: WksANEfXFn6z Hi all, Yesterday I wanted to use `guix describe` and I felt quite helpless when ch= oosing the format I wanted. I suggest adding the possible format list in the help of the `guix describe= -h` command. That way the feature discovery is easier for users that don't= want to dig in the code. It should be easy to add, something like the diff I add below (untested and= horrible, the idea is to help me explain myself rather than serving as a c= ontribution). How do you feel about this? Interesting for anyone? Is there any reason why it's not added already that= I might be missing? Cheers, Ekaitz The obnoxious diff: diff --git a/guix/scripts/describe.scm b/guix/scripts/describe.scm index f13f221da9..0222ed0951 100644 --- a/guix/scripts/describe.scm +++ b/guix/scripts/describe.scm @@ -42,11 +42,13 @@ ;;; Command-line options. ;;; +(define available-formats '("human" "channels" "json" "recutils")) + (define %options ;; Specifications of the command-line options. (list (option '(#\f "format") #t #f (lambda (opt name arg result) - (unless (member arg '("human" "channels" "json" "recutil= s")) + (unless (member arg available-formats) (leave (G_ "~a: unsupported output format~%") arg)) (alist-cons 'format (string->symbol arg) result))) (option '(#\p "profile") #t #f @@ -68,8 +70,8 @@ (define (show-help) (display (G_ "Usage: guix describe [OPTION]... Display information about the channels currently in use.\n")) - (display (G_ " - -f, --format=3DFORMAT display information in the given FORMAT")) + (display (string-append (G_ " + -f, --format=3DFORMAT display information in the given FORMAT: ") (st= ring-join available-formats "|"))) (display (G_ " -p, --profile=3DPROFILE display information about PROFILE")) (newline)