plans: add editing
This commit is contained in:
parent
3f2131f296
commit
179881b9dc
1 changed files with 4 additions and 1 deletions
|
@ -3,11 +3,14 @@ with import <nixpkgs> {};
|
|||
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
|
||||
''
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue