Reaktor taskwarrior: touch if no taskrc exists

This commit is contained in:
jeschli 2018-07-03 22:22:49 +02:00
parent 70e8c4b0a4
commit d6df7ae483

View File

@ -143,9 +143,15 @@ rec {
taskwarrior = buildSimpleReaktorPlugin "task" {
pattern = "^task: (?P<args>.*)$$";
script = pkgs.writeDash "task-wrapper" ''
${pkgs.taskwarrior}/bin/task "$*"
'';
script = let
taskrc = "$HOME/.taskrc";
in
pkgs.writeDash "task-wrapper" ''
if [ -f ${taskrc} ] ; then
touch ${taskrc}
fi
${pkgs.taskwarrior}/bin/task "$*"
'';
};
todo = name: {