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