use builtin "command -v" instead of which (#308)
This commit is contained in:
4
todo.sh
4
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
|
||||
|
||||
Reference in New Issue
Block a user