FS#45828 - [source-highlight] tries to call lesspipe with wrong file name

Attached to Project: Arch Linux
Opened by Oliver Mangold (omangold) - Wednesday, 29 July 2015, 11:51 GMT
Last edited by Jelle van der Waa (jelly) - Saturday, 28 August 2021, 10:06 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jelle van der Waa (jelly)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

The source-highlight package tries to fall back to lesspipe for compressed archives. It tries to call lesspipe as 'lesspipe', but the command is named '/usr/bin/lesspipe.sh', so it fails.

Additional info:
* package version(s)

source-highlight 3.1.8-2
lesspipe 1.82-3

* config and/or log files etc.

---- /usr/bin/src-hilite-lesspipe.sh ----
#! /bin/sh

for source in "$@"; do
case $source in
*ChangeLog|*changelog)
source-highlight --failsafe -f esc --lang-def=changelog.lang --style-file=esc.style -i "$source" ;;
*Makefile|*makefile)
source-highlight --failsafe -f esc --lang-def=makefile.lang --style-file=esc.style -i "$source" ;;
*.tar|*.tgz|*.gz|*.bz2|*.xz)
>>>>>> problem is here >>>>>>
lesspipe "$source" ;;
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
*) source-highlight --failsafe --infer-lang -f esc --style-file=esc.style -i "$source" ;;
esac
done

Steps to reproduce:

call less with source-highlight installed on compresses archive.
This task depends upon

Closed by  Jelle van der Waa (jelly)
Saturday, 28 August 2021, 10:06 GMT
Reason for closing:  Fixed
Additional comments about closing:  source-highlight-3.1.9-6-x86_64.pkg.tar. zst
Comment by Doug Newgard (Scimmia) - Wednesday, 29 July 2015, 15:18 GMT
Unfortunately, lesspipe and lesspipe.sh aren't the same thing (not sure about usage). Blame Debian.

I would suggest taking this upstream. Using a Debian specific script in GNU software doesn't seem right. Fedora carries their own version of lesspipe.sh, though, so things are kind of a mess.
Comment by Bao Trinh (qubidt) - Friday, 20 August 2021, 13:44 GMT
Given `/usr/bin/lesspipe.sh` is provided by the package `lesspipe`, isn't it acceptable to use it here?

Loading...