1--- a/lesspipe.sh.in
2+++ b/lesspipe.sh.in
3@@ -48,8 +48,8 @@ if [[ "$LESS_ADVANCED_PREPROCESSOR" = '' ]]; then
4 fi
5
6 filecmd() {
7- file -L -s "$@"
8- file -L -s -i "$@" 2> /dev/null | sed -n 's/.*charset=/;/p' | tr a-z A-Z
9+ @file@ -L -s "$@"
10+ @file@ -L -s -i "$@" 2> /dev/null | sed -n 's/.*charset=/;/p' | tr a-z A-Z
11 }
12
13 sep=: # file name separator
14@@ -546,7 +546,7 @@ isfinal() {
15
16 # color requires -r or -R when calling less
17 typeset COLOR
18- if [[ $(tput colors) -ge 8 && ("$LESS" = *-*r* || "$LESS" = *-*R*) ]]; then
19+ if [[ $(@tput@ colors) -ge 8 && ("$LESS" = *-*r* || "$LESS" = *-*R*) ]]; then
20 COLOR="--color=always"
21 fi
22