aboutsummaryrefslogtreecommitdiff
path: root/base/taskw
diff options
context:
space:
mode:
Diffstat (limited to 'base/taskw')
-rwxr-xr-xbase/taskw7
1 files changed, 5 insertions, 2 deletions
diff --git a/base/taskw b/base/taskw
index 75fbf82..8b465cf 100755
--- a/base/taskw
+++ b/base/taskw
@@ -214,8 +214,11 @@ case $CMD in
fi ;;
q) exitaltscreen ;;
- *) $TASKBIN $ID modify $IN reviewed:now &>/dev/null
- LASTRES="Modified: $IN" ;;
+ *) if [[ "$IN" != "$LASTCMD" ]] && echo "$IN" | grep -qE "^(wait|pr[oi]|dep|due) "; then
+ LASTRES="$(echo -ne "\e[0;31mDid you mean \"$(echo "$IN" | sed 's/ /:/')\"?")"
+ TASKNUMBER=$((TASKNUMBER - 1))
+ else $TASKBIN $ID modify $IN reviewed:now &>/dev/null
+ LASTRES="Modified: $IN"; fi ;;
esac
LASTCMD="$IN"