From b23e8b3ee5daca0d086fa818d67de8644699b483 Mon Sep 17 00:00:00 2001 From: Victor Borja Date: Wed, 25 Jun 2025 12:24:19 -0600 Subject: [PATCH] update to dendrix --- README.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 39b2e11..7596d18 100644 --- a/README.md +++ b/README.md @@ -327,8 +327,7 @@ filters at configuration time, configuration-library authors can provide custom import-tree instances with an API suited for their particular idioms. -@vic is using this on [Dennix](https://github.com/vic/dennix) for [community conventions](https://github.com/vic/dennix/blob/main/dev/modules/community/_pipeline.nix) -on tagging files. +@vic is using this on [Dendrix](https://github.com/vic/dendrix) for [community conventions](https://github.com/vic/dendrix/blob/main/dev/modules/community/_pipeline.nix) on tagging files. @@ -350,14 +349,11 @@ let (i: i.addAPI { vim-btw = self: self.exclusive "vim" "emacs"; }) ]; - flagRe = flag: ".*/.*?\+${flag}.*/.*"; # matches +foo on dir path - - on = self: flagName: self.match (flagRe flagName); - off = self: flagName: self.matchNot (flagRe flagName); - + on = self: flag: self.filter (lib.hasInfix "+${flag}"); + off = self: flag: self.filterNot (lib.hasInfix "+${flag}"); exclusive = self: onFlag: offFlag: lib.pipe self [ - (self: self.on onFlag) - (self: self.off offFlag) + (self: on self onFlag) + (self: off self offFlag) ]; in {