From 7501d37b45c9af4444fb1fee1e403044240937e7 Mon Sep 17 00:00:00 2001 From: Wallysson Date: Tue, 3 Aug 2021 20:10:28 -0300 Subject: [PATCH] use builtin "command -v" instead of which (#308) --- todo.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/todo.sh b/todo.sh index 9bf6393..5348200 100755 --- a/todo.sh +++ b/todo.sh @@ -1252,7 +1252,7 @@ case $action in actionUsage "$@" else if [ -t 1 ] ; then # STDOUT is a TTY - if which "${PAGER:-less}" >/dev/null 2>&1; then + if command -v "${PAGER:-less}" >/dev/null 2>&1; then # we have a working PAGER (or less as a default) help | "${PAGER:-less}" && exit 0 fi @@ -1263,7 +1263,7 @@ case $action in "shorthelp" ) if [ -t 1 ] ; then # STDOUT is a TTY - if which "${PAGER:-less}" >/dev/null 2>&1; then + if command -v "${PAGER:-less}" >/dev/null 2>&1; then # we have a working PAGER (or less as a default) shorthelp | "${PAGER:-less}" && exit 0 fi