mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-26 19:11:46 +02:00
style: Add option '--list-stylings'.
* guix/scripts/style.scm (show-stylings): New procedure. (%options, show-help): Add "--list-stylings". * doc/guix.texi (Invoking guix style): Document "-l".
This commit is contained in:
@@ -13993,6 +13993,10 @@ The @option{--input-simplification} option described below provides
|
|||||||
fine-grain control over when inputs should be simplified.
|
fine-grain control over when inputs should be simplified.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
@item --list-stylings
|
||||||
|
@itemx -l
|
||||||
|
List and describe the available styling rules and exit.
|
||||||
|
|
||||||
@item --load-path=@var{directory}
|
@item --load-path=@var{directory}
|
||||||
@itemx -L @var{directory}
|
@itemx -L @var{directory}
|
||||||
Add @var{directory} to the front of the package module search path
|
Add @var{directory} to the front of the package module search path
|
||||||
|
|||||||
@@ -798,15 +798,26 @@ PACKAGE."
|
|||||||
(lambda args
|
(lambda args
|
||||||
(show-help)
|
(show-help)
|
||||||
(exit 0)))
|
(exit 0)))
|
||||||
|
(option '(#\l "list-stylings") #f #f
|
||||||
|
(lambda args
|
||||||
|
(show-stylings)
|
||||||
|
(exit 0)))
|
||||||
(option '(#\V "version") #f #f
|
(option '(#\V "version") #f #f
|
||||||
(lambda args
|
(lambda args
|
||||||
(show-version-and-exit "guix style")))))
|
(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)
|
(define (show-help)
|
||||||
(display (G_ "Usage: guix style [OPTION]... [PACKAGE]...
|
(display (G_ "Usage: guix style [OPTION]... [PACKAGE]...
|
||||||
Update package definitions to the latest style.\n"))
|
Update package definitions to the latest style.\n"))
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
-S, --styling=RULE apply RULE, a styling rule"))
|
-S, --styling=RULE apply RULE, a styling rule"))
|
||||||
|
(display (G_ "
|
||||||
|
-l, --list-stylings display the list of available style rules"))
|
||||||
(newline)
|
(newline)
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
-n, --dry-run display files that would be edited but do nothing"))
|
-n, --dry-run display files that would be edited but do nothing"))
|
||||||
|
|||||||
Reference in New Issue
Block a user