Quoting to prevent globbing and splitting.
Adding required spaces after '!'s.
Removing useless echo
Removing deprecated backticks + quoting to avoid globbing and splitting
Quoting array expansions
Passing arguments to help to appease shellcheck
Quoting array expansions
Using proper array assignment in `tasks` and replacing echo with `printf`
Moving task list heading into else block in `tasks`