Skip to content

feat: Add .result for path-configured trees. - #5

Merged
vic merged 1 commit into
mainfrom
vic/jj-change-ztwowvwmzvrr
Jun 23, 2025
Merged

vic merged 1 commit into
mainfrom
vic/jj-change-ztwowvwmzvrr

Conversation

@vic

@vic vic commented Jun 23, 2025

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 23, 2025 10:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a .result attribute to trees configured via paths, updates tests to use this new property, and refreshes documentation to show its usage.

  • Add result field to default.nix for returning the final leaf list without extra paths
  • Update checkmate.nix tests to replace leafs [] with .leafs.result and add an identity test
  • Revise README.md to document pre-configured subtree sharing and show .result in examples

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
default.nix Added result = (self f) [ ]; and a brief comment
checkmate.nix Swapped .leafs [] calls for .leafs.result, new test
README.md Updated pattern links, renamed section, added .result example
Comments suppressed due to low confidence (2)

default.nix:86

  • [nitpick] The comment is a bit unclear. Consider clarifying what ‘empty’ refers to, e.g., “Returns the configured tree’s leaf list with no additional paths.”
          # Applies empty (for already path-configured trees)

README.md:286

  • [nitpick] Consider adding a short remark before this example explaining that .result extracts the final filtered leaf list from the configured tree, for clarity to new users.
    (lib.pipe root [(on "vim") (off "emacs") (i: i.result)])

Comment thread checkmate.nix Resolved
@vic
vic merged commit 8c51bbf into main Jun 23, 2025
@vic
vic deleted the vic/jj-change-ztwowvwmzvrr branch June 23, 2025 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants