Add an embellished lesspipe.sh as described in the man page.
P.S. it is stupid I have to define both SCRIPTS and SCRIPTSNAME.
This commit is contained in:
parent
09c80124a3
commit
f07cfbf5d4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=111938
@ -5,6 +5,8 @@ SRCS= main.c screen.c brac.c ch.c charset.c cmdbuf.c command.c decode.c \
|
||||
edit.c filename.c forwback.c help.c ifile.c input.c jump.c line.c \
|
||||
linenum.c lsystem.c mark.c optfunc.c option.c opttbl.c os.c output.c \
|
||||
position.c prompt.c search.c signal.c tags.c ttyin.c version.c
|
||||
SCRIPTS=lesspipe.sh
|
||||
SCRIPTSNAME=lesspipe.sh
|
||||
DPADD= ${LIBTERMCAP}
|
||||
LDADD= -ltermcap
|
||||
LINKS= ${BINDIR}/less ${BINDIR}/more
|
||||
|
13
usr.bin/less/lesspipe.sh
Normal file
13
usr.bin/less/lesspipe.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#! /bin/sh
|
||||
# ex:ts=8
|
||||
|
||||
# $FreeBSD$
|
||||
|
||||
case "$1" in
|
||||
*.Z) uncompress -c $1 2>/dev/null
|
||||
;;
|
||||
*.gz) gzip -d -c $1 2>/dev/null
|
||||
;;
|
||||
*.bz2) bzip2 -d -c $1 2>/dev/null
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue
Block a user