From 179881b9dc6c726062b812c75954a6ff62062452 Mon Sep 17 00:00:00 2001 From: TudbuT Date: Wed, 30 Oct 2024 01:19:01 +0100 Subject: [PATCH] plans: add editing --- plans.script.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plans.script.nix b/plans.script.nix index b7bfcc7..689ce09 100644 --- a/plans.script.nix +++ b/plans.script.nix @@ -3,11 +3,14 @@ with import {}; pkgs.writeShellScriptBin "plans" '' #!/bin/sh if [ "$1" = "add" ] ; then - echo "$2" >> ~/sync/plans.txt + echo "- $2" >> ~/sync/plans.txt fi if [ "$1" = "done" ] ; then tail -n"$(($(wc -l < ~/sync/plans.txt) - 1))" ~/sync/plans.txt fi + if [ "$1" = "edit" ] ; then + hx ~/sync/plans.txt + fi cat ~/sync/plans.txt ''