16 lines
319 B
Nix
16 lines
319 B
Nix
with import <nixpkgs> {};
|
|
|
|
pkgs.writeShellScriptBin "plans" ''
|
|
#!/bin/sh
|
|
if [ "$1" = "add" ] ; then
|
|
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
|
|
''
|
|
|