cat-highlight: Don't try to use lesspipe
This commit is contained in:
parent
a649fd2f64
commit
a7a404fa92
@ -4,6 +4,15 @@
|
||||
|
||||
# Check if we are in a terminal and $LESSOPEN is not empty
|
||||
if [[ -t 1 && -n "${LESSOPEN}" ]]; then
|
||||
# Programs that won't work with cat
|
||||
local -a known_bad=("lesspipe")
|
||||
for baddy in ${known_bad}; do
|
||||
if [[ "${LESSOPEN}" =~ "${baddy}" ]]; then
|
||||
\cat "${@}"
|
||||
return ${?}
|
||||
fi
|
||||
done
|
||||
|
||||
local -a args
|
||||
local -a files
|
||||
for arg in "${@}"; do
|
||||
|
Loading…
x
Reference in New Issue
Block a user