* [bug#56083] [PATCH] style: Add option '--list-stylings'.
@ 2022-06-19 8:37 Hartmut Goebel
2022-06-19 9:02 ` Maxime Devos
0 siblings, 1 reply; 4+ messages in thread
From: Hartmut Goebel @ 2022-06-19 8:37 UTC (permalink / raw)
To: 56083
* guix/scripts/style.scm (show-stylings): New procedure.
(%options, show-help): Add "--list-stylings".
* doc/guix.texi (Invoking guix style): Document "-l".
---
doc/guix.texi | 4 ++++
guix/scripts/style.scm | 11 +++++++++++
2 files changed, 15 insertions(+)
diff --git a/doc/guix.texi b/doc/guix.texi
index 86348fc02c..2768762e62 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -13963,6 +13963,10 @@ The @option{--input-simplification} option described below provides
fine-grain control over when inputs should be simplified.
@end table
+@item --list-stylings
+@itemx -l
+List and describe the available styling rule and exit.
+
@item --load-path=@var{directory}
@itemx -L @var{directory}
Add @var{directory} to the front of the package module search path
diff --git a/guix/scripts/style.scm b/guix/scripts/style.scm
index 8123570c38..3381a54130 100644
--- a/guix/scripts/style.scm
+++ b/guix/scripts/style.scm
@@ -797,15 +797,26 @@ PACKAGE."
(lambda args
(show-help)
(exit 0)))
+ (option '(#\l "list-stylings") #f #f
+ (lambda args
+ (show-stylings)
+ (exit 0)))
(option '(#\V "version") #f #f
(lambda args
(show-version-and-exit "guix style")))))
+(define (show-stylings)
+ (display (G_ "Available styling rules:\n"))
+ (display (G_ "- format: Format the given package definition(s)\n"))
+ (display (G_ "- inputs: Rewrite package inputs to the “new style”\n")))
+
(define (show-help)
(display (G_ "Usage: guix style [OPTION]... [PACKAGE]...
Update package definitions to the latest style.\n"))
(display (G_ "
-S, --styling=RULE apply RULE, a styling rule"))
+ (display (G_ "
+ -l, --list-stylings display the list of available style rules"))
(newline)
(display (G_ "
-n, --dry-run display files that would be edited but do nothing"))
--
2.30.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#56083] [PATCH] style: Add option '--list-stylings'.
2022-06-19 8:37 [bug#56083] [PATCH] style: Add option '--list-stylings' Hartmut Goebel
@ 2022-06-19 9:02 ` Maxime Devos
2022-07-04 14:14 ` Hartmut Goebel
2022-07-04 14:17 ` bug#56083: " Hartmut Goebel
0 siblings, 2 replies; 4+ messages in thread
From: Maxime Devos @ 2022-06-19 9:02 UTC (permalink / raw)
To: Hartmut Goebel, 56083
[-- Attachment #1: Type: text/plain, Size: 252 bytes --]
Hartmut Goebel schreef op zo 19-06-2022 om 10:37 [+0200]:
> +@item --list-stylings
> +@itemx -l
> +List and describe the available styling rule and exit.
Nitpick: ‘styling rule’ -> ‘styling rules’. Otherwie LGTM.
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#56083] [PATCH] style: Add option '--list-stylings'.
2022-06-19 9:02 ` Maxime Devos
@ 2022-07-04 14:14 ` Hartmut Goebel
2022-07-04 14:17 ` bug#56083: " Hartmut Goebel
1 sibling, 0 replies; 4+ messages in thread
From: Hartmut Goebel @ 2022-07-04 14:14 UTC (permalink / raw)
To: 56083; +Cc: Maxime Devos
Thanks for the review. I fixed it and pushed as
a3d86b341d361530127c36fbfbf77d638df2c1de.
--
Regards
Hartmut Goebel
| Hartmut Goebel | h.goebel@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#56083: [PATCH] style: Add option '--list-stylings'.
2022-06-19 9:02 ` Maxime Devos
2022-07-04 14:14 ` Hartmut Goebel
@ 2022-07-04 14:17 ` Hartmut Goebel
1 sibling, 0 replies; 4+ messages in thread
From: Hartmut Goebel @ 2022-07-04 14:17 UTC (permalink / raw)
To: 56083-close
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-04 14:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-19 8:37 [bug#56083] [PATCH] style: Add option '--list-stylings' Hartmut Goebel
2022-06-19 9:02 ` Maxime Devos
2022-07-04 14:14 ` Hartmut Goebel
2022-07-04 14:17 ` bug#56083: " Hartmut Goebel
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.