summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2018-07-10 20:35:38 +0200
committerjeschli <jeschli@gmail.com>2018-07-10 20:35:38 +0200
commitea4fe76393a527eb4a754d0c8a8fa35de2bd20e5 (patch)
tree68c4a0098e528599689b94bcd29cc4877d7230df
parentd6df7ae483b984b90bdc8d4540301ef394885a98 (diff)
Reaktor: taskwarrior -> task-{add,delete,list}
-rw-r--r--krebs/5pkgs/simple/Reaktor/plugins.nix32
1 files changed, 22 insertions, 10 deletions
diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix
index 7573c9256..96e0af2d7 100644
--- a/krebs/5pkgs/simple/Reaktor/plugins.nix
+++ b/krebs/5pkgs/simple/Reaktor/plugins.nix
@@ -141,16 +141,28 @@ rec {
'';
});
- taskwarrior = buildSimpleReaktorPlugin "task" {
- pattern = "^task: (?P<args>.*)$$";
- script = let
- taskrc = "$HOME/.taskrc";
- in
- pkgs.writeDash "task-wrapper" ''
- if [ -f ${taskrc} ] ; then
- touch ${taskrc}
- fi
- ${pkgs.taskwarrior}/bin/task "$*"
+ taskrcFile = builtins.toFile "taskrc" ''
+ confirmation=no
+ '';
+
+ task-add = buildSimpleReaktorPlugin "task-add" {
+ pattern = "^task-add: (?P<args>.*)$$";
+ script = pkgs.writeDash "task-add" ''
+ ${pkgs.taskwarrior}/bin/task rc:${taskrcFile} add "$*"
+ '';
+ };
+
+ task-list = buildSimpleReaktorPlugin "task-list" {
+ pattern = "^task-list";
+ script = pkgs.writeDash "task-list" ''
+ ${pkgs.taskwarrior}/bin/task rc:${taskrcFile} list
+ '';
+ };
+
+ task-delete = buildSimpleReaktorPlugin "task-delete" {
+ pattern = "^task-remove: (?P<args>.*)$$";
+ script = pkgs.writeDash "task-delete" ''
+ ${pkgs.taskwarrior}/bin/task rc:${taskrcFile} delete "$*"
'';
};