Commit 35f93fe9 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-sh-functions: use type -fpP instead of which by default

parent dd166cc9
......@@ -972,17 +972,17 @@ is_url()
}
# print a path to the command if exists in $PATH
if a= which which 2>/dev/null >/dev/null ; then
# the best case if we have which command (other ways needs checking)
# TODO: don't use which at all, it is binary, not builtin shell command
if a= type -a type 2>/dev/null >/dev/null ; then
print_command_path()
{
a= which -- "$1" 2>/dev/null
a= type -fpP -- "$1" 2>/dev/null
}
elif a= type -a type 2>/dev/null >/dev/null ; then
elif a= which which 2>/dev/null >/dev/null ; then
# the best case if we have which command (other ways needs checking)
# TODO: don't use which at all, it is a binary, not builtin shell command
print_command_path()
{
a= type -fpP -- "$1" 2>/dev/null
a= which -- "$1" 2>/dev/null
}
else
print_command_path()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment