summaryrefslogtreecommitdiff
path: root/todo
diff options
context:
space:
mode:
authorfilip <“filip.rabiega@gmail.com”>2026-01-18 11:44:26 +0100
committerfilip <“filip.rabiega@gmail.com”>2026-01-18 11:44:26 +0100
commit83954961af8b6337da100e038561f2fd975ac1fe (patch)
tree33a45dbf91cc4c0b8975287b9537db8aa272505f /todo
parentafd02bfcce54e3252d356f34c25a155c855f3612 (diff)
downloadchadscripts-master.tar.gz
chadscripts-master.tar.bz2
chadscripts-master.zip
huge changesHEADmaster
Diffstat (limited to 'todo')
-rwxr-xr-xtodo16
1 files changed, 8 insertions, 8 deletions
diff --git a/todo b/todo
index fbb893b..ecabbc7 100755
--- a/todo
+++ b/todo
@@ -13,16 +13,16 @@ prompt="Add/delete a task: "
cmd=$(dmenu -l "$height" -p "$prompt" "$@" < "$file")
while [ -n "$cmd" ]; do
- if grep -q "^$cmd\$" "$file"; then
- grep -v "^$cmd\$" "$file" > "$file.$$"
- mv "$file.$$" "$file"
+ if grep -q "^$cmd\$" "$file"; then
+ grep -v "^$cmd\$" "$file" > "$file.$$"
+ mv "$file.$$" "$file"
height=$(( height - 1 ))
- else
- echo "$cmd" >> "$file"
- height=$(( height + 1 ))
- fi
+ else
+ echo "$cmd" >> "$file"
+ height=$(( height + 1 ))
+ fi
- cmd=$(dmenu -l "$height" -p "$prompt" "$@" < "$file")
+ cmd=$(dmenu -l "$height" -p "$prompt" "$@" < "$file")
done
exit 0