From d2422771eb8e4186841ebab8ef486328e9a07d28 Mon Sep 17 00:00:00 2001 From: isabel Date: Thu, 27 Jun 2024 15:35:55 -0400 Subject: nix flake show: add the description if it exists (cherry picked from commit 8cd1d02f90eb9915e640c5d370d919fad9833c65) nix flake show: Only print up to the first new line if it exists. (cherry picked from commit 5281a44927bdb51bfe6e5de12262d815c98f6fe7) add tests (cherry picked from commit 74ae0fbdc70a5079a527fe143c4832d1357011f7) Handle long strings, embedded new lines and empty descriptions (cherry picked from commit 2ca7b3afdbbd983173a17fa0a822cf7623601367) Account for total length of 80 (cherry picked from commit 1cc808c18cbaaf26aaae42bb1d7f7223f25dd364) docs: add nix flake show description release note fix: remove white space nix flake show: trim length based on terminal size test: account for terminal size docs(flake-description): before and after commands; add myself to credits Upstream-PR: https://github.com/NixOS/nix/pull/10980 Change-Id: Ie1c667dc816b3dd81e65a1f5395e57ea48ee0362 --- doc/manual/change-authors.yml | 7 +++++ doc/manual/rl-next/nix-flake-show-description.md | 37 ++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 doc/manual/rl-next/nix-flake-show-description.md (limited to 'doc') diff --git a/doc/manual/change-authors.yml b/doc/manual/change-authors.yml index f56a1e6fb..49df7f5df 100644 --- a/doc/manual/change-authors.yml +++ b/doc/manual/change-authors.yml @@ -65,10 +65,17 @@ horrors: iFreilicht: github: iFreilicht +isabelroses: + forgejo: isabelroses + github: isabelroses + jade: forgejo: jade github: lf- +kjeremy: + github: kjeremy + kloenk: forgejo: kloenk github: kloenk diff --git a/doc/manual/rl-next/nix-flake-show-description.md b/doc/manual/rl-next/nix-flake-show-description.md new file mode 100644 index 000000000..e819a3a29 --- /dev/null +++ b/doc/manual/rl-next/nix-flake-show-description.md @@ -0,0 +1,37 @@ +--- +synopsis: "Lix will now show the package descriptions in when running `nix flake show`." +cls: [1540] +issues: [] +credits: [kjeremy, isabelroses] +category: Improvements +--- + +When running `nix flake show`, Lix will now show the package descriptions, if they exist. + +Before: + +```shell +$ nix flake show +path:/home/isabel/dev/lix-show?lastModified=1721736108&narHash=sha256-Zo8HP1ur7Q2b39hKUEG8EAh/opgq8xJ2jvwQ/htwO4Q%3D +└───packages + └───x86_64-linux + ├───aNoDescription: package 'simple' + ├───bOneLineDescription: package 'simple' + ├───cMultiLineDescription: package 'simple' + ├───dLongDescription: package 'simple' + └───eEmptyDescription: package 'simple' +``` + +After: + +```shell +$ nix flake show +path:/home/isabel/dev/lix-show?lastModified=1721736108&narHash=sha256-Zo8HP1ur7Q2b39hKUEG8EAh/opgq8xJ2jvwQ/htwO4Q%3D +└───packages + └───x86_64-linux + ├───aNoDescription: package 'simple' + ├───bOneLineDescription: package 'simple' - 'one line' + ├───cMultiLineDescription: package 'simple' - 'line one' + ├───dLongDescription: package 'simple' - 'abcdefghijklmnopqrstuvwxyz' + └───eEmptyDescription: package 'simple' +``` -- cgit v1.2.3