From c4ce31305258126e0f5809697e084bf97f31f77f Mon Sep 17 00:00:00 2001 From: Herman Rimm Date: Mon, 2 Sep 2024 20:58:05 +0200 Subject: scripts: style: Add 'alphabetical-sort' option. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/scripts/style.scm (show-help): Describe option. (order-packages): Add procedure. (format-whole-file): Add 'order?' argument. (%options): Add 'alphabetical-sort' option. (guix-style): Alphabetically order packages in files. * tests/guix-style.sh: Test alphabetical ordering. * doc/guix.texi (Invoking guix style): Document option. Change-Id: I4aa7c0bd0b6d42529ae7d304587ffb10bf5f4006 Signed-off-by: Ludovic Courtès --- doc/guix.texi | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 144adf327e..16c697586a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -15227,6 +15227,13 @@ configuration (you need write permissions for the file): guix style -f /etc/config.scm @end example +@item --alphabetical-sort +@itemx -A +Place the top-level package definitions in the given files in +alphabetical order. Package definitions with matching names are placed +with versions in descending order. This option only has an effect in +combination with @option{--whole-file}. + @item --styling=@var{rule} @itemx -S @var{rule} Apply @var{rule}, one of the following styling rules: -- cgit 1.4.1