2024-10-30 01:16:16 +01:00
|
|
|
with import <nixpkgs> {};
|
|
|
|
|
|
|
|
pkgs.writeShellScriptBin "plans" ''
|
|
|
|
#!/bin/sh
|
|
|
|
if [ "$1" = "add" ] ; then
|
2024-10-30 01:19:01 +01:00
|
|
|
echo "- $2" >> ~/sync/plans.txt
|
2024-10-30 01:16:16 +01:00
|
|
|
fi
|
|
|
|
if [ "$1" = "done" ] ; then
|
|
|
|
tail -n"$(($(wc -l < ~/sync/plans.txt) - 1))" ~/sync/plans.txt
|
|
|
|
fi
|
2024-10-30 01:19:01 +01:00
|
|
|
if [ "$1" = "edit" ] ; then
|
|
|
|
hx ~/sync/plans.txt
|
|
|
|
fi
|
2024-10-30 01:16:16 +01:00
|
|
|
cat ~/sync/plans.txt
|
|
|
|
''
|
|
|
|
|