From: Ekaitz Zarraga <ekaitz@elenq.tech>
To: "guix-devel\\@gnu.org" <guix-devel@gnu.org>
Subject: guix describe user experience improvement proposition
Date: Tue, 12 May 2020 19:07:14 +0000 [thread overview]
Message-ID: <JboJeYxSU_buO9sg9evetI_NUHXReKcC6fVF9a1VZcsEbRETnbkt61Dw0cP5Fq_o2fX3OObrEezJ3gOPEsiF87uJqsCn7jKC5CywWw6PyyI=@elenq.tech> (raw)
Hi all,
Yesterday I wanted to use `guix describe` and I felt quite helpless when choosing 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 contribution).
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" "recutils"))
+ (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=FORMAT display information in the given FORMAT"))
+ (display (string-append (G_ "
+ -f, --format=FORMAT display information in the given FORMAT: ") (string-join available-formats "|")))
(display (G_ "
-p, --profile=PROFILE display information about PROFILE"))
(newline)
next reply other threads:[~2020-05-12 19:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 19:07 Ekaitz Zarraga [this message]
2020-05-12 19:44 ` guix describe user experience improvement proposition zimoun
2020-05-12 20:13 ` Ekaitz Zarraga
2020-05-12 22:20 ` Ekaitz Zarraga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='JboJeYxSU_buO9sg9evetI_NUHXReKcC6fVF9a1VZcsEbRETnbkt61Dw0cP5Fq_o2fX3OObrEezJ3gOPEsiF87uJqsCn7jKC5CywWw6PyyI=@elenq.tech' \
--to=ekaitz@elenq.tech \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).