diff options
author | Alexis Hovorka <[email protected]> | 2021-07-04 12:00:29 -0600 |
---|---|---|
committer | Alexis Hovorka <[email protected]> | 2021-07-04 12:00:29 -0600 |
commit | d328e2478dbb91ae0a925e9ad41c6c8b2fd4515c (patch) | |
tree | a9df48a7ca458277fbb706721df1e43b73674e2d | |
parent | f05d6f8f3b52e3ebd5639726dd07da5668979b15 (diff) |
[feat] Add basic task review typo check
-rwxr-xr-x | base/taskw | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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" |