xref: /freebsd/usr.bin/less/lesspipe.sh (revision ab00ac327a66a53edaac95b536b209db3ae2cd9f)
1#! /bin/sh
2# ex:ts=8
3
4# $FreeBSD$
5
6case "$1" in
7	*.zip)
8		exec unzip -c "$1" 2>/dev/null
9		;;
10	*.Z)
11		exec uncompress -c "$1"	2>/dev/null
12		;;
13	*.gz)
14		exec gzip -d -c "$1"	2>/dev/null
15		;;
16	*.bz2)
17		exec bzip2 -d -c "$1"	2>/dev/null
18		;;
19	*.xz)
20		exec xz -d -c "$1"	2>/dev/null
21		;;
22	*.lzma)
23		exec lzma -d -c "$1"	2>/dev/null
24		;;
25	*.zst)
26		exec zstd -d -q -c "$1"	2>/dev/null
27		;;
28esac
29