diff --git a/todo.sh b/todo.sh index 172dea8..d7136f9 100755 --- a/todo.sh +++ b/todo.sh @@ -807,9 +807,9 @@ case $action in "help" ) if [ -t 1 ] ; then # STDOUT is a TTY - if (exec which ${PAGER:-less} 2>/dev/null >/dev/null); then + if which "${PAGER:-less}" >/dev/null 2>&1; then # we have a working PAGER (or less as a default) - help | exec ${PAGER:-less} + help | "${PAGER:-less}" && exit 0 fi fi help # just in case something failed above, we go ahead and just spew to STDOUT