summaryrefslogtreecommitdiff
path: root/todo
diff options
context:
space:
mode:
authorfilip <“filip.rabiega@gmail.com”>2026-01-21 23:42:15 +0100
committerfilip <“filip.rabiega@gmail.com”>2026-01-21 23:42:15 +0100
commit17df35dc088c9b1b159c2b78d8330fa9cc9a672a (patch)
tree052205953f7f11a9ea847a9b4d238f6acdbc25b8 /todo
parentd127601c83c1a30063b76eb89bf0d9a32ed435b9 (diff)
downloadchadscripts-17df35dc088c9b1b159c2b78d8330fa9cc9a672a.tar.gz
chadscripts-17df35dc088c9b1b159c2b78d8330fa9cc9a672a.tar.bz2
chadscripts-17df35dc088c9b1b159c2b78d8330fa9cc9a672a.zip
reformat most scripts
Diffstat (limited to 'todo')
-rwxr-xr-xtodo20
1 files changed, 10 insertions, 10 deletions
diff --git a/todo b/todo
index 06fa01f..cba0126 100755
--- a/todo
+++ b/todo
@@ -10,18 +10,18 @@ touch "$file"
height="$(wc -l "$file" | awk '{print $1}')"
prompt="Add/delete a task: "
-cmd=$(dmenu -l "$height" -p "$prompt" "$@" < "$file")
+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"
- height=$(( height - 1 ))
- else
- echo "$cmd" >> "$file"
- height=$(( height + 1 ))
- fi
+ 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
- cmd=$(dmenu -l "$height" -p "$prompt" "$@" < "$file")
+ cmd=$(dmenu -l "$height" -p "$prompt" "$@" <"$file")
done
exit 0