diff --git a/plans.script.nix b/plans.script.nix index 689ce09..7526103 100644 --- a/plans.script.nix +++ b/plans.script.nix @@ -6,7 +6,8 @@ pkgs.writeShellScriptBin "plans" '' echo "- $2" >> ~/sync/plans.txt fi if [ "$1" = "done" ] ; then - tail -n"$(($(wc -l < ~/sync/plans.txt) - 1))" ~/sync/plans.txt + tail -n"$(($(wc -l < ~/sync/plans.txt) - 1))" ~/sync/plans.txt > ~/plans.txt.tmp + mv ~/plans.txt.tmp ~/sync/plans.txt fi if [ "$1" = "edit" ] ; then hx ~/sync/plans.txt