aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/tools/misc/lesspipe/fix-paths.patch
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/tools/misc/lesspipe/fix-paths.patch')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/misc/lesspipe/fix-paths.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/misc/lesspipe/fix-paths.patch b/infra/libkookie/nixpkgs/pkgs/tools/misc/lesspipe/fix-paths.patch
new file mode 100644
index 000000000000..1bffcf53c827
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/misc/lesspipe/fix-paths.patch
@@ -0,0 +1,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
+