From 016455d8f2ed5d906c0f8d330c103df6f5deaad0 Mon Sep 17 00:00:00 2001 From: Alexander Zhirov Date: Wed, 28 May 2025 00:23:27 +0300 Subject: [PATCH] 0.0.11 --- source/app.d | 37 +++++++++++++++++++++++++++++++++++++ source/snag/version_.d | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/source/app.d b/source/app.d index 4b40f32..b15d19c 100644 --- a/source/app.d +++ b/source/app.d @@ -21,6 +21,23 @@ int main(string[] args) .optional ) ) + .add(new Command("rules", "Tracking rules") + .add(new Command("update", "Update rules") + .add(new Flag("r", "remove", "Removing from tracking the found ignored files") + .name("remove") + .optional + ) + ) + .add(new Command("reset", "Reset rules (restores rules to pre-change state)")) + .add(new Command("clear", "Clear rules")) + .add(new Command("save", "Save rules")) + .add(new Command("show", "Show rules") + .add(new Flag("c", "config", "Show rules from the configuration file") + .name("config") + .optional + ) + ) + ) .add(new Command("status", "Checking the status of tracked files")) .add(new Command("diff", "Show changed data")) .add(new Command("import", "Import snapshot from a tar.gz archive") @@ -160,6 +177,26 @@ int main(string[] args) i.option("author", ""), i.option("email", "") ) + ) + .on("rules", (r) { + auto rules = new SnagRules(config); + r + .on("update", update => + rules.update(update.flag("remove")) + ) + .on("reset", reset => + rules.reset() + ) + .on("clear", clear => + rules.clear() + ) + .on("save", clear => + rules.save() + ) + .on("show", show => + rules.show(show.flag("config")) + ); + } ); } catch (SnagException e) { e.print(); diff --git a/source/snag/version_.d b/source/snag/version_.d index 82e9fc2..2c89ac7 100644 --- a/source/snag/version_.d +++ b/source/snag/version_.d @@ -1,3 +1,3 @@ module snag.version_; -enum snagVersion = "0.0.10"; +enum snagVersion = "0.0.11";