* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2007-11-06 1:58 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2007-11-06 1:58 UTC (permalink / raw
To: gentoo-commits
vapier 07/11/06 01:58:44
Modified: lesspipe.sh
Log:
add support for LZMA files
(Portage version: 2.1.3.16)
Revision Changes Path
1.25 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.25&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.25&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.24&r2=1.25
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- lesspipe.sh 25 Aug 2007 15:42:52 -0000 1.24
+++ lesspipe.sh 6 Nov 2007 01:58:44 -0000 1.25
@@ -50,7 +50,7 @@
local out=$(${DECOMPRESSOR} -- "$1" | file -)
case ${out} in
*troff*)
- # Need to make sure we pass path to man or it will try
+ # Need to make sure we pass path to man or it will try
# to locate "$1" in the man search paths
if [[ $1 == /* ]] ; then
man -- "$1"
@@ -86,10 +86,12 @@
*.tar) tar tvvf "$1" ;;
*.tar.bz2|*.tbz2|*.tbz) tar tjvvf "$1" ;;
*.tar.gz|*.tgz|*.tar.z) tar tzvvf "$1" ;;
+ *.tar.lzma) lzma -dc -- "$1" | tar tvvf - ;;
### Misc archives ###
*.bz2) bzip2 -dc -- "$1" ;;
*.gz|*.z) gzip -dc -- "$1" ;;
+ *.lzma) lzma -dc -- "$1" ;;
*.zip) unzip -l "$1" ;;
*.rpm) rpm -qpivl --changelog -- "$1" ;;
*.cpi|*.cpio) cpio -itv < "$1" ;;
@@ -195,7 +197,7 @@
echo "Usage: lesspipe.sh <file>"
elif [[ $1 == "-V" ]] ; then
Id="cvsid"
- cvsid="$Id: lesspipe.sh,v 1.24 2007/08/25 15:42:52 vapier Exp $"
+ cvsid="$Id: lesspipe.sh,v 1.25 2007/11/06 01:58:44 vapier Exp $"
cat <<-EOF
$cvsid
Copyright 2001-2006 Gentoo Foundation
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2007-11-06 2:19 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2007-11-06 2:19 UTC (permalink / raw
To: gentoo-commits
vapier 07/11/06 02:19:29
Modified: lesspipe.sh
Log:
more lzma support
(Portage version: 2.1.3.16)
Revision Changes Path
1.26 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.26&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.26&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.25&r2=1.26
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- lesspipe.sh 6 Nov 2007 01:58:44 -0000 1.25
+++ lesspipe.sh 6 Nov 2007 02:19:29 -0000 1.26
@@ -9,10 +9,11 @@
guesscompress() {
case "$1" in
- *.gz) echo "gunzip -c" ;;
- *.bz2) echo "bunzip2 -c" ;;
- *.Z) echo "compress -d" ;;
- *) echo "cat" ;;
+ *.gz) echo "gunzip -c" ;;
+ *.bz2) echo "bunzip2 -c" ;;
+ *.lzma) echo "unlzma -c" ;;
+ *.Z) echo "compress -d" ;;
+ *) echo "cat" ;;
esac
}
@@ -46,6 +47,7 @@
*.[0-9n]|*.man|\
*.[0-9n].bz2|*.man.bz2|\
*.[0-9n].gz|*.man.gz|\
+ *.[0-9n].lzma|*.man.lzma|\
*.[0-9][a-z].gz|*.[0-9][a-z].gz)
local out=$(${DECOMPRESSOR} -- "$1" | file -)
case ${out} in
@@ -197,7 +199,7 @@
echo "Usage: lesspipe.sh <file>"
elif [[ $1 == "-V" ]] ; then
Id="cvsid"
- cvsid="$Id: lesspipe.sh,v 1.25 2007/11/06 01:58:44 vapier Exp $"
+ cvsid="$Id: lesspipe.sh,v 1.26 2007/11/06 02:19:29 vapier Exp $"
cat <<-EOF
$cvsid
Copyright 2001-2006 Gentoo Foundation
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2008-03-16 13:01 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2008-03-16 13:01 UTC (permalink / raw
To: gentoo-commits
vapier 08/03/16 13:01:52
Modified: lesspipe.sh
Log:
Add case for shell scripts for file output #213565 by Matthias B.
(Portage version: 2.2_pre2)
Revision Changes Path
1.27 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.27&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.27&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.26&r2=1.27
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- lesspipe.sh 6 Nov 2007 02:19:29 -0000 1.26
+++ lesspipe.sh 16 Mar 2008 13:01:51 -0000 1.27
@@ -19,19 +19,22 @@
lesspipe_file() {
local out=$(file -L -- "$1")
+ local suffix
case ${out} in
- *" ar archive"*) lesspipe "$1" ".a" ;;
- *" tar archive"*) lesspipe "$1" ".tar" ;;
- *" CAB-Installer"*) lesspipe "$1" ".cab" ;;
- *" troff "*) lesspipe "$1" ".man" ;;
- *" shared object"*) lesspipe "$1" ".so" ;;
- *" Zip archive"*) lesspipe "$1" ".zip" ;;
- *" LHa"*archive*) lesspipe "$1" ".lha" ;;
- *" cpio archive"*) lesspipe "$1" ".cpio" ;;
- *" ELF "*) readelf -a -- "$1" ;;
- *": data") hexdump -C -- "$1" ;;
- *) return 1 ;;
+ *" ar archive"*) suffix="a";;
+ *" CAB-Installer"*) suffix="cab";;
+ *" cpio archive"*) suffix="cpio";;
+ *" ELF "*) suffix="elf";;
+ *" LHa"*archive*) suffix="lha";;
+ *" troff "*) suffix="man";;
+ *" script text"*) suffix="sh";;
+ *" shared object"*) suffix="so";;
+ *" tar archive"*) suffix="tar";;
+ *" Zip archive"*) suffix="zip";;
+ *": data") hexdump -C -- "$1"; return 0;;
+ *) return 1;;
esac
+ lesspipe "$1" ".${suffix}"
return 0
}
@@ -105,6 +108,7 @@
*.zoo) zoo -list "$1" ;;
*.7z) 7z l -- "$1" ;;
*.a) ar tv "$1" ;;
+ *.elf) readelf -a -- "$1" ;;
*.so) readelf -h -d -s -- "$1" ;;
*.mo|*.gmo) msgunfmt -- "$1" ;;
@@ -199,7 +203,7 @@
echo "Usage: lesspipe.sh <file>"
elif [[ $1 == "-V" ]] ; then
Id="cvsid"
- cvsid="$Id: lesspipe.sh,v 1.26 2007/11/06 02:19:29 vapier Exp $"
+ cvsid="$Id: lesspipe.sh,v 1.27 2008/03/16 13:01:51 vapier Exp $"
cat <<-EOF
$cvsid
Copyright 2001-2006 Gentoo Foundation
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2008-04-16 17:33 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2008-04-16 17:33 UTC (permalink / raw
To: gentoo-commits
vapier 08/04/16 17:33:39
Modified: lesspipe.sh
Log:
steal some more ideas from Debian: user filter (~/.lessfilter), more zip extensions, and rock/joliet iso handling
(Portage version: 2.2_pre5)
Revision Changes Path
1.28 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.28&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.28&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.27&r2=1.28
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- lesspipe.sh 16 Mar 2008 13:01:51 -0000 1.27
+++ lesspipe.sh 16 Apr 2008 17:33:38 -0000 1.28
@@ -44,6 +44,11 @@
local DECOMPRESSOR=$(guesscompress "$match")
+ # User filters
+ if [[ -x ~/.lessfilter ]] ; then
+ ~/.lessfilter "$1" && exit 0
+ fi
+
case "$match" in
### Doc files ###
@@ -97,7 +102,6 @@
*.bz2) bzip2 -dc -- "$1" ;;
*.gz|*.z) gzip -dc -- "$1" ;;
*.lzma) lzma -dc -- "$1" ;;
- *.zip) unzip -l "$1" ;;
*.rpm) rpm -qpivl --changelog -- "$1" ;;
*.cpi|*.cpio) cpio -itv < "$1" ;;
*.ace) unace l "$1" ;;
@@ -105,8 +109,8 @@
*.arj) unarj l -- "$1" ;;
*.cab) cabextract -l -- "$1" ;;
*.lha|*.lzh) lha v "$1" ;;
- *.zoo) zoo -list "$1" ;;
- *.7z) 7z l -- "$1" ;;
+ *.zoo) zoo -list "$1" || unzoo -l "$1" ;;
+ *.7z) 7z l -- "$1" || 7za l -- "$1" ;;
*.a) ar tv "$1" ;;
*.elf) readelf -a -- "$1" ;;
*.so) readelf -h -d -s -- "$1" ;;
@@ -114,8 +118,12 @@
*.rar|.r[0-9][0-9]) unrar l -- "$1" ;;
+ *.jar|*.war|*.ear|*.xpi|*.zip)
+ unzip -v "$1" || miniunzip -l "$1" || miniunz -l "$1" || zipinfo -v "$1"
+ ;;
+
*.deb|*.udeb)
- if type -p dpkg > /dev/null ; then
+ if type -P dpkg > /dev/null ; then
dpkg --info "$1"
dpkg --contents "$1"
else
@@ -134,9 +142,22 @@
*.mp3) mp3info "$1" || id3info "$1" ;;
*.ogg) ogginfo "$1" ;;
*.flac) metaflac --list "$1" ;;
- *.iso) isoinfo -d -i "$1" ; isoinfo -l -i "$1" ;;
- *.bin|*.cue) cd-info --no-header --no-device-info "$1" ;;
*.torrent) torrentinfo-console "$1" ;;
+ *.bin|*.cue|*.raw)
+ # not all .bin/.raw files are cd images, so fall back to hexdump
+ cd-info --no-header --no-device-info "$1" || lesspipe_file "$1"
+ ;;
+ *.iso)
+ iso_info=$(isoinfo -d -i "$1")
+ echo "${iso_info}"
+ # Joliet output overrides Rock Ridge, so prefer the better Rock
+ case ${iso_info} in
+ *$'\n'"Rock Ridge"*) iso_opts="-R";;
+ *$'\n'"Joliet"*) iso_opts="-J";;
+ *) iso_opts="";;
+ esac
+ isoinfo -l ${iso_opts} -i "$1"
+ ;;
### Source code ###
*.awk|*.groff|*.java|*.js|*.m4|*.php|*.pl|*.pm|*.pod|*.sh|\
@@ -201,28 +222,35 @@
if [[ -z $1 ]] ; then
echo "Usage: lesspipe.sh <file>"
-elif [[ $1 == "-V" ]] ; then
+elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
- cvsid="$Id: lesspipe.sh,v 1.27 2008/03/16 13:01:51 vapier Exp $"
+ cvsid="$Id: lesspipe.sh,v 1.28 2008/04/16 17:33:38 vapier Exp $"
cat <<-EOF
$cvsid
- Copyright 2001-2006 Gentoo Foundation
+ Copyright 2001-2008 Gentoo Foundation
Mike Frysinger <vapier@gentoo.org>
(with plenty of ideas stolen from other projects/distros)
-
-
+
+
EOF
less -V
elif [[ $1 == "-h" || $1 == "--help" ]] ; then
cat <<-EOF
lesspipe.sh: preproccess files before sending them to less
-
+
Usage: lesspipe.sh <file>
-
+
lesspipe.sh specific settings:
LESSCOLOR env - toggle colorizing of output
LESSCOLORIZER env - program used to colorize output (default: code2color)
-
+
+ You can create per-user filters as well by creating the executable file:
+ ~/.lessfilter
+ One argument is passed to it: the file to display.
+
+ To use lesspipe.sh, simply add to your environment:
+ export LESSOPEN="|lesspipe.sh %s"
+
Run 'less --help' or 'man less' for more info
EOF
elif [[ -d $1 ]] ; then
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2008-04-18 19:58 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2008-04-18 19:58 UTC (permalink / raw
To: gentoo-commits
vapier 08/04/18 19:58:14
Modified: lesspipe.sh
Log:
add support for a LESSIGNORE variable as suggested by d_m@plastic-idolatry.com #217954
(Portage version: 2.2_pre5)
Revision Changes Path
1.29 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.29&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.29&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.28&r2=1.29
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- lesspipe.sh 16 Apr 2008 17:33:38 -0000 1.28
+++ lesspipe.sh 18 Apr 2008 19:58:13 -0000 1.29
@@ -49,6 +49,11 @@
~/.lessfilter "$1" && exit 0
fi
+ local ignore
+ for ignore in ${LESSIGNORE} ; do
+ [[ ${match} == *.${ignore} ]] && exit 0
+ done
+
case "$match" in
### Doc files ###
@@ -224,7 +229,7 @@
echo "Usage: lesspipe.sh <file>"
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
- cvsid="$Id: lesspipe.sh,v 1.28 2008/04/16 17:33:38 vapier Exp $"
+ cvsid="$Id: lesspipe.sh,v 1.29 2008/04/18 19:58:13 vapier Exp $"
cat <<-EOF
$cvsid
Copyright 2001-2008 Gentoo Foundation
@@ -243,6 +248,7 @@
lesspipe.sh specific settings:
LESSCOLOR env - toggle colorizing of output
LESSCOLORIZER env - program used to colorize output (default: code2color)
+ LESSIGNORE - list of extensions to ignore (don't do anything fancy)
You can create per-user filters as well by creating the executable file:
~/.lessfilter
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2008-05-30 23:54 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2008-05-30 23:54 UTC (permalink / raw
To: gentoo-commits
vapier 08/05/30 23:54:10
Modified: lesspipe.sh
Log:
handle 7-zip archives via `file` so that things like sd7 files work magically
(Portage version: 2.2_pre5.spank.spunk)
Revision Changes Path
1.30 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.30&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.30&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.29&r2=1.30
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- lesspipe.sh 18 Apr 2008 19:58:13 -0000 1.29
+++ lesspipe.sh 30 May 2008 23:54:10 -0000 1.30
@@ -21,6 +21,7 @@
local out=$(file -L -- "$1")
local suffix
case ${out} in
+ *" 7-zip archive"*) suffix="7z";;
*" ar archive"*) suffix="a";;
*" CAB-Installer"*) suffix="cab";;
*" cpio archive"*) suffix="cpio";;
@@ -229,7 +230,7 @@
echo "Usage: lesspipe.sh <file>"
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
- cvsid="$Id: lesspipe.sh,v 1.29 2008/04/18 19:58:13 vapier Exp $"
+ cvsid="$Id: lesspipe.sh,v 1.30 2008/05/30 23:54:10 vapier Exp $"
cat <<-EOF
$cvsid
Copyright 2001-2008 Gentoo Foundation
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2008-12-27 5:03 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2008-12-27 5:03 UTC (permalink / raw
To: gentoo-commits
vapier 08/12/27 05:03:18
Modified: lesspipe.sh
Log:
fall back to ctorrent if torrentinfo-console doesnt exist
(Portage version: 2.2_rc18/cvs/Linux 2.6.28 x86_64)
Revision Changes Path
1.31 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.31&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.31&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.30&r2=1.31
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- lesspipe.sh 30 May 2008 23:54:10 -0000 1.30
+++ lesspipe.sh 27 Dec 2008 05:03:18 -0000 1.31
@@ -148,7 +148,7 @@
*.mp3) mp3info "$1" || id3info "$1" ;;
*.ogg) ogginfo "$1" ;;
*.flac) metaflac --list "$1" ;;
- *.torrent) torrentinfo-console "$1" ;;
+ *.torrent) torrentinfo-console "$1" || ctorrent -x "$1" ;;
*.bin|*.cue|*.raw)
# not all .bin/.raw files are cd images, so fall back to hexdump
cd-info --no-header --no-device-info "$1" || lesspipe_file "$1"
@@ -230,7 +230,7 @@
echo "Usage: lesspipe.sh <file>"
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
- cvsid="$Id: lesspipe.sh,v 1.30 2008/05/30 23:54:10 vapier Exp $"
+ cvsid="$Id: lesspipe.sh,v 1.31 2008/12/27 05:03:18 vapier Exp $"
cat <<-EOF
$cvsid
Copyright 2001-2008 Gentoo Foundation
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2009-02-02 19:44 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2009-02-02 19:44 UTC (permalink / raw
To: gentoo-commits
vapier 09/02/02 19:44:14
Modified: lesspipe.sh
Log:
Add support for .lz/.xz and unify more places with ${DECOMPRESSOR}.
(Portage version: 2.2_rc23/cvs/Linux x86_64)
Revision Changes Path
1.32 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.32&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.32&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.31&r2=1.32
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- lesspipe.sh 27 Dec 2008 05:03:18 -0000 1.31
+++ lesspipe.sh 2 Feb 2009 19:44:13 -0000 1.32
@@ -9,11 +9,12 @@
guesscompress() {
case "$1" in
- *.gz) echo "gunzip -c" ;;
- *.bz2) echo "bunzip2 -c" ;;
- *.lzma) echo "unlzma -c" ;;
- *.Z) echo "compress -d" ;;
- *) echo "cat" ;;
+ *.gz|*.z) echo "gunzip -c" ;;
+ *.bz2) echo "bunzip2 -c" ;;
+ *.lz) echo "lzip -c" ;;
+ *.lzma) echo "unlzma -c" ;;
+ *.xz) echo "xzdec" ;;
+ *) echo "cat" ;;
esac
}
@@ -99,15 +100,18 @@
;;
### Tar files ###
- *.tar) tar tvvf "$1" ;;
- *.tar.bz2|*.tbz2|*.tbz) tar tjvvf "$1" ;;
- *.tar.gz|*.tgz|*.tar.z) tar tzvvf "$1" ;;
- *.tar.lzma) lzma -dc -- "$1" | tar tvvf - ;;
+ *.tar|\
+ *.tar.bz2|*.tbz2|*.tbz|\
+ *.tar.gz|*.tgz|*.tar.z|\
+ *.tar.lz|*.tar.tlz|\
+ *.tar.lzma|*.tar.xz)
+ ${DECOMPRESSOR} -- "$1" | tar tvvf -;;
### Misc archives ###
- *.bz2) bzip2 -dc -- "$1" ;;
- *.gz|*.z) gzip -dc -- "$1" ;;
- *.lzma) lzma -dc -- "$1" ;;
+ *.bz2|\
+ *.gz|*.z|\
+ *.lz|\
+ *.lzma|*.xz) ${DECOMPRESSOR} -- "$1" ;;
*.rpm) rpm -qpivl --changelog -- "$1" ;;
*.cpi|*.cpio) cpio -itv < "$1" ;;
*.ace) unace l "$1" ;;
@@ -230,10 +234,10 @@
echo "Usage: lesspipe.sh <file>"
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
- cvsid="$Id: lesspipe.sh,v 1.31 2008/12/27 05:03:18 vapier Exp $"
+ cvsid="$Id: lesspipe.sh,v 1.32 2009/02/02 19:44:13 vapier Exp $"
cat <<-EOF
$cvsid
- Copyright 2001-2008 Gentoo Foundation
+ Copyright 2001-2009 Gentoo Foundation
Mike Frysinger <vapier@gentoo.org>
(with plenty of ideas stolen from other projects/distros)
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2009-02-09 18:58 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2009-02-09 18:58 UTC (permalink / raw
To: gentoo-commits
vapier 09/02/09 18:58:11
Modified: lesspipe.sh
Log:
force tr to C locale so upper->lower always works as expected
Revision Changes Path
1.33 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.33&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.33&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.32&r2=1.33
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- lesspipe.sh 2 Feb 2009 19:44:13 -0000 1.32
+++ lesspipe.sh 9 Feb 2009 18:58:10 -0000 1.33
@@ -217,7 +217,7 @@
# Maybe we didn't match due to case issues ...
if [[ ${recur} == 0 ]] ; then
recur=1
- lesspipe "$1" "$(echo $1 | tr '[:upper:]' '[:lower:]')"
+ lesspipe "$1" "$(echo $1 | LC_ALL=C tr '[:upper:]' '[:lower:]')"
# Maybe we didn't match because the file is named weird ...
else
@@ -234,7 +234,7 @@
echo "Usage: lesspipe.sh <file>"
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
- cvsid="$Id: lesspipe.sh,v 1.32 2009/02/02 19:44:13 vapier Exp $"
+ cvsid="$Id: lesspipe.sh,v 1.33 2009/02/09 18:58:10 vapier Exp $"
cat <<-EOF
$cvsid
Copyright 2001-2009 Gentoo Foundation
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2009-03-13 6:06 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2009-03-13 6:06 UTC (permalink / raw
To: gentoo-commits
vapier 09/03/13 06:06:29
Modified: lesspipe.sh
Log:
simplify lesscolor code detection
(Portage version: 2.2_rc25/cvs/Linux x86_64)
Revision Changes Path
1.34 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.34&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.34&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.33&r2=1.34
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- lesspipe.sh 9 Feb 2009 18:58:10 -0000 1.33
+++ lesspipe.sh 13 Mar 2009 06:06:29 -0000 1.34
@@ -188,18 +188,13 @@
exit 0
fi
- # Only colorize if user forces it ...
- if [[ ${LESSCOLOR} == "2" ]]; then
+ # 2: Only colorize if user forces it ...
+ # 1: ... or we know less will handle raw codes -- this will
+ # not detect -seiRM, so set LESSCOLORIZER yourself
+ if [[ ${LESSCOLOR} == "2" ]] || [[ " ${LESS} " == *" -"[rR]" "* ]] ; then
${LESSCOLORIZER} "$1"
exit 0
fi
- # ... or we know less will handle raw codes
- for opt in ${LESS} ; do
- if [[ ${opt} == "-r" || ${opt} == "-R" ]] ; then
- ${LESSCOLORIZER} "$1"
- break
- fi
- done
;;
# May not be such a good idea :)
@@ -234,7 +229,7 @@
echo "Usage: lesspipe.sh <file>"
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
- cvsid="$Id: lesspipe.sh,v 1.33 2009/02/09 18:58:10 vapier Exp $"
+ cvsid="$Id: lesspipe.sh,v 1.34 2009/03/13 06:06:29 vapier Exp $"
cat <<-EOF
$cvsid
Copyright 2001-2009 Gentoo Foundation
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2009-04-11 23:20 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2009-04-11 23:20 UTC (permalink / raw
To: gentoo-commits
vapier 09/04/11 23:20:51
Modified: lesspipe.sh
Log:
document possible values of LESSCOLOR
Revision Changes Path
1.35 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.35&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.35&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.34&r2=1.35
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- lesspipe.sh 13 Mar 2009 06:06:29 -0000 1.34
+++ lesspipe.sh 11 Apr 2009 23:20:51 -0000 1.35
@@ -229,7 +229,7 @@
echo "Usage: lesspipe.sh <file>"
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
- cvsid="$Id: lesspipe.sh,v 1.34 2009/03/13 06:06:29 vapier Exp $"
+ cvsid="$Id: lesspipe.sh,v 1.35 2009/04/11 23:20:51 vapier Exp $"
cat <<-EOF
$cvsid
Copyright 2001-2009 Gentoo Foundation
@@ -246,7 +246,7 @@
Usage: lesspipe.sh <file>
lesspipe.sh specific settings:
- LESSCOLOR env - toggle colorizing of output
+ LESSCOLOR env - toggle colorizing of output (no/yes/always)
LESSCOLORIZER env - program used to colorize output (default: code2color)
LESSIGNORE - list of extensions to ignore (don't do anything fancy)
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2009-10-22 7:53 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2009-10-22 7:53 UTC (permalink / raw
To: gentoo-commits
vapier 09/10/22 07:53:43
Modified: lesspipe.sh
Log:
start a filesystem image section
(Portage version: 2.2_rc46/cvs/Linux x86_64)
Revision Changes Path
1.36 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.36&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.36&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.35&r2=1.36
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- lesspipe.sh 11 Apr 2009 23:20:51 -0000 1.35
+++ lesspipe.sh 22 Oct 2009 07:53:42 -0000 1.36
@@ -142,6 +142,9 @@
fi
;;
+ ### Filesystems ###
+ *.squashfs) unsquashfs -s "$1" && unsquashfs -ll "$1" ;;
+
### Media ###
*.bmp|*.gif|*.jpeg|*.jpg|*.ico|*.pcd|*.pcx|*.png|*.ppm|*.tga|*.tiff|*.tif)
identify "$1" || file -L -- "$1"
@@ -229,7 +232,7 @@
echo "Usage: lesspipe.sh <file>"
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
- cvsid="$Id: lesspipe.sh,v 1.35 2009/04/11 23:20:51 vapier Exp $"
+ cvsid="$Id: lesspipe.sh,v 1.36 2009/10/22 07:53:42 vapier Exp $"
cat <<-EOF
$cvsid
Copyright 2001-2009 Gentoo Foundation
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2010-02-05 6:36 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2010-02-05 6:36 UTC (permalink / raw
To: gentoo-commits
vapier 10/02/05 06:36:59
Modified: lesspipe.sh
Log:
Fix handling of short tarball names #303433 by Mike Williams, and add a LESSDEBUG helper.
(Portage version: 2.2_rc61/cvs/Linux x86_64)
Revision Changes Path
1.37 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.37&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.37&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.36&r2=1.37
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- lesspipe.sh 22 Oct 2009 07:53:42 -0000 1.36
+++ lesspipe.sh 5 Feb 2010 06:36:59 -0000 1.37
@@ -5,16 +5,18 @@
# TODO: handle compressed files better
+[[ -n ${LESSDEBUG} ]] && set -x
+
trap 'exit 0' PIPE
guesscompress() {
case "$1" in
- *.gz|*.z) echo "gunzip -c" ;;
- *.bz2) echo "bunzip2 -c" ;;
- *.lz) echo "lzip -c" ;;
- *.lzma) echo "unlzma -c" ;;
- *.xz) echo "xzdec" ;;
- *) echo "cat" ;;
+ *.gz|*.z) echo "gunzip -c" ;;
+ *.bz2|*.bz) echo "bunzip2 -c" ;;
+ *.lz) echo "lzip -c" ;;
+ *.lzma) echo "unlzma -c" ;;
+ *.xz) echo "xzdec" ;;
+ *) echo "cat" ;;
esac
}
@@ -101,11 +103,12 @@
### Tar files ###
*.tar|\
- *.tar.bz2|*.tbz2|*.tbz|\
- *.tar.gz|*.tgz|*.tar.z|\
+ *.tar.bz2|*.tar.gz|*.tar.z|\
*.tar.lz|*.tar.tlz|\
*.tar.lzma|*.tar.xz)
${DECOMPRESSOR} -- "$1" | tar tvvf -;;
+ *.tbz2|*.tbz|*.tgz|*.tlz)
+ lesspipe "$1" "$1".tar.${1##*.t} ;;
### Misc archives ###
*.bz2|\
@@ -232,7 +235,7 @@
echo "Usage: lesspipe.sh <file>"
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
- cvsid="$Id: lesspipe.sh,v 1.36 2009/10/22 07:53:42 vapier Exp $"
+ cvsid="$Id: lesspipe.sh,v 1.37 2010/02/05 06:36:59 vapier Exp $"
cat <<-EOF
$cvsid
Copyright 2001-2009 Gentoo Foundation
@@ -266,5 +269,7 @@
ls -alF -- "$1"
else
recur=0
- lesspipe "$1" 2> /dev/null
+ [[ -n ${LESSDEBUG} ]] \
+ && lesspipe "$1" \
+ || lesspipe "$1" 2> /dev/null
fi
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2010-02-10 23:57 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2010-02-10 23:57 UTC (permalink / raw
To: gentoo-commits
vapier 10/02/10 23:57:00
Modified: lesspipe.sh
Log:
many packed exe's can be viewed/unpacked with 7z
(Portage version: 2.2_rc61/cvs/Linux x86_64)
Revision Changes Path
1.38 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.38&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.38&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.37&r2=1.38
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- lesspipe.sh 5 Feb 2010 06:36:59 -0000 1.37
+++ lesspipe.sh 10 Feb 2010 23:56:59 -0000 1.38
@@ -123,7 +123,7 @@
*.cab) cabextract -l -- "$1" ;;
*.lha|*.lzh) lha v "$1" ;;
*.zoo) zoo -list "$1" || unzoo -l "$1" ;;
- *.7z) 7z l -- "$1" || 7za l -- "$1" ;;
+ *.7z|*.exe) 7z l -- "$1" || 7za l -- "$1" ;;
*.a) ar tv "$1" ;;
*.elf) readelf -a -- "$1" ;;
*.so) readelf -h -d -s -- "$1" ;;
@@ -235,7 +235,7 @@
echo "Usage: lesspipe.sh <file>"
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
- cvsid="$Id: lesspipe.sh,v 1.37 2010/02/05 06:36:59 vapier Exp $"
+ cvsid="$Id: lesspipe.sh,v 1.38 2010/02/10 23:56:59 vapier Exp $"
cat <<-EOF
$cvsid
Copyright 2001-2009 Gentoo Foundation
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2010-02-14 17:11 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2010-02-14 17:11 UTC (permalink / raw
To: gentoo-commits
vapier 10/02/14 17:11:01
Modified: lesspipe.sh
Log:
Rework lesspipe to fallback to the coloring tool rather than maintaining a list of matches #304359 by Dror Levin. Start renaming lesspipe.sh to lesspipe to better match other distros. Tip people to run `lesspipe -h` for color info #274457 by Jaak Ristioja.
(Portage version: 2.2_rc62/cvs/Linux x86_64)
Revision Changes Path
1.39 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.39&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.39&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.38&r2=1.39
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- lesspipe.sh 10 Feb 2010 23:56:59 -0000 1.38
+++ lesspipe.sh 14 Feb 2010 17:11:00 -0000 1.39
@@ -175,34 +175,6 @@
isoinfo -l ${iso_opts} -i "$1"
;;
- ### Source code ###
- *.awk|*.groff|*.java|*.js|*.m4|*.php|*.pl|*.pm|*.pod|*.sh|\
- *.ad[asb]|*.asm|*.inc|*.[ch]|*.[ch]pp|*.[ch]xx|*.cc|*.hh|\
- *.lsp|*.l|*.pas|*.p|*.xml|*.xps|*.xsl|*.axp|*.ppd|*.pov|\
- *.diff|*.patch|*.py|*.rb|*.sql|*.ebuild|*.eclass)
-
- # Allow people to flip color off if they dont want it
- case ${LESSCOLOR} in
- always) LESSCOLOR=2;;
- [yY][eE][sS]|1|true) LESSCOLOR=1;;
- [nN][oO]|0|false) LESSCOLOR=0;;
- *) LESSCOLOR=0;; # default to no color #188835
- esac
- [[ ${LESSCOLORIZER+set} != "set" ]] && LESSCOLORIZER=code2color
- if [[ ${LESSCOLOR} == "0" ]] || [[ -z ${LESSCOLORIZER} ]] ; then
- # let less itself handle these files
- exit 0
- fi
-
- # 2: Only colorize if user forces it ...
- # 1: ... or we know less will handle raw codes -- this will
- # not detect -seiRM, so set LESSCOLORIZER yourself
- if [[ ${LESSCOLOR} == "2" ]] || [[ " ${LESS} " == *" -"[rR]" "* ]] ; then
- ${LESSCOLORIZER} "$1"
- exit 0
- fi
- ;;
-
# May not be such a good idea :)
# ### Device nodes ###
# /dev/[hs]d[a-z]*)
@@ -226,6 +198,29 @@
lesspipe_file "$1"
fi
+ # So no matches from above ... finally fall back to an external
+ # coloring package. No matching here so we don't have to worry
+ # about keeping in sync with random packages. Any coloring tool
+ # you use should not output errors about unsupported files to
+ # stdout. If it does, it's your problem.
+
+ # Allow people to flip color off if they dont want it
+ case ${LESSCOLOR} in
+ always) LESSCOLOR=2;;
+ [yY][eE][sS]|[yY]|1|true) LESSCOLOR=1;;
+ [nN][oO]|[nN]|0|false) LESSCOLOR=0;;
+ *) LESSCOLOR=0;; # default to no color #188835
+ esac
+ if [[ ${LESSCOLOR} != "0" ]] && [[ -n ${LESSCOLORIZER=code2color} ]] ; then
+ # 2: Only colorize if user forces it ...
+ # 1: ... or we know less will handle raw codes -- this will
+ # not detect -seiRM, so set LESSCOLORIZER yourself
+ if [[ ${LESSCOLOR} == "2" ]] || [[ " ${LESS} " == *" -"[rR]" "* ]] ; then
+ ${LESSCOLORIZER} "$1"
+ fi
+ fi
+
+ # Nothing left to do but let less deal
exit 0
;;
esac
@@ -235,10 +230,9 @@
echo "Usage: lesspipe.sh <file>"
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
- cvsid="$Id: lesspipe.sh,v 1.38 2010/02/10 23:56:59 vapier Exp $"
cat <<-EOF
- $cvsid
- Copyright 2001-2009 Gentoo Foundation
+ $Id: lesspipe.sh,v 1.39 2010/02/14 17:11:00 vapier Exp $
+ Copyright 2001-2010 Gentoo Foundation
Mike Frysinger <vapier@gentoo.org>
(with plenty of ideas stolen from other projects/distros)
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2010-03-23 20:54 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2010-03-23 20:54 UTC (permalink / raw
To: gentoo-commits
vapier 10/03/23 20:54:13
Modified: lesspipe.sh
Log:
Fix by Jack Lloyd to handle .tbz and .tar.bz files #308855.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Revision Changes Path
1.40 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.40&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.40&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.39&r2=1.40
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- lesspipe.sh 14 Feb 2010 17:11:00 -0000 1.39
+++ lesspipe.sh 23 Mar 2010 20:54:13 -0000 1.40
@@ -103,7 +103,7 @@
### Tar files ###
*.tar|\
- *.tar.bz2|*.tar.gz|*.tar.z|\
+ *.tar.bz2|*.tar.bz|*.tar.gz|*.tar.z|\
*.tar.lz|*.tar.tlz|\
*.tar.lzma|*.tar.xz)
${DECOMPRESSOR} -- "$1" | tar tvvf -;;
@@ -231,7 +231,7 @@
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
cat <<-EOF
- $Id: lesspipe.sh,v 1.39 2010/02/14 17:11:00 vapier Exp $
+ $Id: lesspipe.sh,v 1.40 2010/03/23 20:54:13 vapier Exp $
Copyright 2001-2010 Gentoo Foundation
Mike Frysinger <vapier@gentoo.org>
(with plenty of ideas stolen from other projects/distros)
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2010-08-24 1:01 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2010-08-24 1:01 UTC (permalink / raw
To: gentoo-commits
vapier 10/08/24 01:01:25
Modified: lesspipe.sh
Log:
Add support for txz archives by Marcin Baczyński #334027.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Revision Changes Path
1.41 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.41&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.41&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.40&r2=1.41
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- lesspipe.sh 23 Mar 2010 20:54:13 -0000 1.40
+++ lesspipe.sh 24 Aug 2010 01:01:25 -0000 1.41
@@ -107,7 +107,7 @@
*.tar.lz|*.tar.tlz|\
*.tar.lzma|*.tar.xz)
${DECOMPRESSOR} -- "$1" | tar tvvf -;;
- *.tbz2|*.tbz|*.tgz|*.tlz)
+ *.tbz2|*.tbz|*.tgz|*.tlz|*.txz)
lesspipe "$1" "$1".tar.${1##*.t} ;;
### Misc archives ###
@@ -231,7 +231,7 @@
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
cat <<-EOF
- $Id: lesspipe.sh,v 1.40 2010/03/23 20:54:13 vapier Exp $
+ $Id: lesspipe.sh,v 1.41 2010/08/24 01:01:25 vapier Exp $
Copyright 2001-2010 Gentoo Foundation
Mike Frysinger <vapier@gentoo.org>
(with plenty of ideas stolen from other projects/distros)
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2010-12-31 20:51 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2010-12-31 20:51 UTC (permalink / raw
To: gentoo-commits
vapier 10/12/31 20:51:15
Modified: lesspipe.sh
Log:
decode some certs
Revision Changes Path
1.42 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.42&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.42&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.41&r2=1.42
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- lesspipe.sh 24 Aug 2010 01:01:25 -0000 1.41
+++ lesspipe.sh 31 Dec 2010 20:51:15 -0000 1.42
@@ -175,6 +175,10 @@
isoinfo -l ${iso_opts} -i "$1"
;;
+ ### Encryption stuff ###
+ *.crl) openssl crl -hash -text -noout -in "$1" ;;
+ *.pem) openssl x509 -hash -text -noout -in "$1" ;;
+
# May not be such a good idea :)
# ### Device nodes ###
# /dev/[hs]d[a-z]*)
@@ -231,7 +235,7 @@
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
cat <<-EOF
- $Id: lesspipe.sh,v 1.41 2010/08/24 01:01:25 vapier Exp $
+ $Id: lesspipe.sh,v 1.42 2010/12/31 20:51:15 vapier Exp $
Copyright 2001-2010 Gentoo Foundation
Mike Frysinger <vapier@gentoo.org>
(with plenty of ideas stolen from other projects/distros)
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2010-12-31 20:52 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2010-12-31 20:52 UTC (permalink / raw
To: gentoo-commits
vapier 10/12/31 20:52:17
Modified: lesspipe.sh
Log:
lesspipe.sh -> lesspipe
Revision Changes Path
1.43 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.43&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.43&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.42&r2=1.43
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- lesspipe.sh 31 Dec 2010 20:51:15 -0000 1.42
+++ lesspipe.sh 31 Dec 2010 20:52:17 -0000 1.43
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Preprocessor for 'less'. Used when this environment variable is set:
-# LESSOPEN="|lesspipe.sh %s"
+# LESSOPEN="|lesspipe %s"
# TODO: handle compressed files better
@@ -231,11 +231,11 @@
}
if [[ -z $1 ]] ; then
- echo "Usage: lesspipe.sh <file>"
+ echo "Usage: lesspipe <file>"
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
cat <<-EOF
- $Id: lesspipe.sh,v 1.42 2010/12/31 20:51:15 vapier Exp $
+ $Id: lesspipe.sh,v 1.43 2010/12/31 20:52:17 vapier Exp $
Copyright 2001-2010 Gentoo Foundation
Mike Frysinger <vapier@gentoo.org>
(with plenty of ideas stolen from other projects/distros)
@@ -245,11 +245,11 @@
less -V
elif [[ $1 == "-h" || $1 == "--help" ]] ; then
cat <<-EOF
- lesspipe.sh: preproccess files before sending them to less
+ lesspipe: preproccess files before sending them to less
- Usage: lesspipe.sh <file>
+ Usage: lesspipe <file>
- lesspipe.sh specific settings:
+ lesspipe specific settings:
LESSCOLOR env - toggle colorizing of output (no/yes/always)
LESSCOLORIZER env - program used to colorize output (default: code2color)
LESSIGNORE - list of extensions to ignore (don't do anything fancy)
@@ -258,8 +258,8 @@
~/.lessfilter
One argument is passed to it: the file to display.
- To use lesspipe.sh, simply add to your environment:
- export LESSOPEN="|lesspipe.sh %s"
+ To use lesspipe, simply add to your environment:
+ export LESSOPEN="|lesspipe %s"
Run 'less --help' or 'man less' for more info
EOF
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2011-01-18 20:26 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2011-01-18 20:26 UTC (permalink / raw
To: gentoo-commits
vapier 11/01/18 20:26:13
Modified: lesspipe.sh
Log:
also call new torrentinfo #351426 by Raphaël Vinot
(Portage version: 2.2.0_alpha13/cvs/Linux x86_64)
Revision Changes Path
1.44 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.44&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.44&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.43&r2=1.44
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- lesspipe.sh 31 Dec 2010 20:52:17 -0000 1.43
+++ lesspipe.sh 18 Jan 2011 20:26:13 -0000 1.44
@@ -158,7 +158,7 @@
*.mp3) mp3info "$1" || id3info "$1" ;;
*.ogg) ogginfo "$1" ;;
*.flac) metaflac --list "$1" ;;
- *.torrent) torrentinfo-console "$1" || ctorrent -x "$1" ;;
+ *.torrent) torrentinfo "$1" || torrentinfo-console "$1" || ctorrent -x "$1" ;;
*.bin|*.cue|*.raw)
# not all .bin/.raw files are cd images, so fall back to hexdump
cd-info --no-header --no-device-info "$1" || lesspipe_file "$1"
@@ -235,7 +235,7 @@
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
cat <<-EOF
- $Id: lesspipe.sh,v 1.43 2010/12/31 20:52:17 vapier Exp $
+ $Id: lesspipe.sh,v 1.44 2011/01/18 20:26:13 vapier Exp $
Copyright 2001-2010 Gentoo Foundation
Mike Frysinger <vapier@gentoo.org>
(with plenty of ideas stolen from other projects/distros)
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2011-01-20 3:26 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2011-01-20 3:26 UTC (permalink / raw
To: gentoo-commits
vapier 11/01/20 03:26:14
Modified: lesspipe.sh
Log:
allow files matching a `file` string to fall back to colorization if there are no shell script matches #351426 by Raphaël Vinot
(Portage version: 2.2.0_alpha13/cvs/Linux x86_64)
Revision Changes Path
1.45 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.45&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.45&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.44&r2=1.45
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- lesspipe.sh 18 Jan 2011 20:26:13 -0000 1.44
+++ lesspipe.sh 20 Jan 2011 03:26:14 -0000 1.45
@@ -188,19 +188,13 @@
### Everything else ###
*)
- # Sanity check
- [[ ${recur} == 2 ]] && exit 0
+ case $(( recur++ )) in
+ # Maybe we didn't match due to case issues ...
+ 0) lesspipe "$1" "$(echo $1 | LC_ALL=C tr '[:upper:]' '[:lower:]')" ;;
- # Maybe we didn't match due to case issues ...
- if [[ ${recur} == 0 ]] ; then
- recur=1
- lesspipe "$1" "$(echo $1 | LC_ALL=C tr '[:upper:]' '[:lower:]')"
-
- # Maybe we didn't match because the file is named weird ...
- else
- recur=2
- lesspipe_file "$1"
- fi
+ # Maybe we didn't match because the file is named weird ...
+ 1) lesspipe_file "$1" ;;
+ esac
# So no matches from above ... finally fall back to an external
# coloring package. No matching here so we don't have to worry
@@ -235,7 +229,7 @@
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
cat <<-EOF
- $Id: lesspipe.sh,v 1.44 2011/01/18 20:26:13 vapier Exp $
+ $Id: lesspipe.sh,v 1.45 2011/01/20 03:26:14 vapier Exp $
Copyright 2001-2010 Gentoo Foundation
Mike Frysinger <vapier@gentoo.org>
(with plenty of ideas stolen from other projects/distros)
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2011-10-09 19:19 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2011-10-09 19:19 UTC (permalink / raw
To: gentoo-commits
vapier 11/10/09 19:19:07
Modified: lesspipe.sh
Log:
Only run cd-info when the .cue file exists #285507 by Martin von Gagern.
(Portage version: 2.2.0_alpha59/cvs/Linux x86_64)
Revision Changes Path
1.46 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.46&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.46&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.45&r2=1.46
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- lesspipe.sh 20 Jan 2011 03:26:14 -0000 1.45
+++ lesspipe.sh 9 Oct 2011 19:19:07 -0000 1.46
@@ -160,8 +160,12 @@
*.flac) metaflac --list "$1" ;;
*.torrent) torrentinfo "$1" || torrentinfo-console "$1" || ctorrent -x "$1" ;;
*.bin|*.cue|*.raw)
- # not all .bin/.raw files are cd images, so fall back to hexdump
- cd-info --no-header --no-device-info "$1" || lesspipe_file "$1"
+ # not all .bin/.raw files are cd images #285507
+ # fall back to lesspipe_file if .cue doesn't exist, or if
+ # cd-info failed to parse things sanely
+ [[ -e ${1%.*}.cue ]] \
+ && cd-info --no-header --no-device-info "$1" \
+ || lesspipe_file "$1"
;;
*.iso)
iso_info=$(isoinfo -d -i "$1")
@@ -229,7 +233,7 @@
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
cat <<-EOF
- $Id: lesspipe.sh,v 1.45 2011/01/20 03:26:14 vapier Exp $
+ $Id: lesspipe.sh,v 1.46 2011/10/09 19:19:07 vapier Exp $
Copyright 2001-2010 Gentoo Foundation
Mike Frysinger <vapier@gentoo.org>
(with plenty of ideas stolen from other projects/distros)
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2011-12-07 20:29 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2011-12-07 20:29 UTC (permalink / raw
To: gentoo-commits
vapier 11/12/07 20:29:25
Modified: lesspipe.sh
Log:
Also check for `7zr` when processing 7z archives.
(Portage version: 2.2.0_alpha79/cvs/Linux x86_64)
Revision Changes Path
1.47 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.47&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.47&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.46&r2=1.47
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- lesspipe.sh 9 Oct 2011 19:19:07 -0000 1.46
+++ lesspipe.sh 7 Dec 2011 20:29:25 -0000 1.47
@@ -123,7 +123,7 @@
*.cab) cabextract -l -- "$1" ;;
*.lha|*.lzh) lha v "$1" ;;
*.zoo) zoo -list "$1" || unzoo -l "$1" ;;
- *.7z|*.exe) 7z l -- "$1" || 7za l -- "$1" ;;
+ *.7z|*.exe) 7z l -- "$1" || 7za l -- "$1" || 7zr l -- "$1" ;;
*.a) ar tv "$1" ;;
*.elf) readelf -a -- "$1" ;;
*.so) readelf -h -d -s -- "$1" ;;
@@ -233,7 +233,7 @@
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
cat <<-EOF
- $Id: lesspipe.sh,v 1.46 2011/10/09 19:19:07 vapier Exp $
+ $Id: lesspipe.sh,v 1.47 2011/12/07 20:29:25 vapier Exp $
Copyright 2001-2010 Gentoo Foundation
Mike Frysinger <vapier@gentoo.org>
(with plenty of ideas stolen from other projects/distros)
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2012-09-04 19:13 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2012-09-04 19:13 UTC (permalink / raw
To: gentoo-commits
vapier 12/09/04 19:13:58
Modified: lesspipe.sh
Log:
Use the --wide flag when calling readelf to avoid truncating long symbol names #433637 by Raphaël Droz.
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
Revision Changes Path
1.48 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.48&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.48&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.47&r2=1.48
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- lesspipe.sh 7 Dec 2011 20:29:25 -0000 1.47
+++ lesspipe.sh 4 Sep 2012 19:13:58 -0000 1.48
@@ -125,8 +125,8 @@
*.zoo) zoo -list "$1" || unzoo -l "$1" ;;
*.7z|*.exe) 7z l -- "$1" || 7za l -- "$1" || 7zr l -- "$1" ;;
*.a) ar tv "$1" ;;
- *.elf) readelf -a -- "$1" ;;
- *.so) readelf -h -d -s -- "$1" ;;
+ *.elf) readelf -a -W -- "$1" ;;
+ *.so) readelf -h -d -s -W -- "$1" ;;
*.mo|*.gmo) msgunfmt -- "$1" ;;
*.rar|.r[0-9][0-9]) unrar l -- "$1" ;;
@@ -233,7 +233,7 @@
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
cat <<-EOF
- $Id: lesspipe.sh,v 1.47 2011/12/07 20:29:25 vapier Exp $
+ $Id: lesspipe.sh,v 1.48 2012/09/04 19:13:58 vapier Exp $
Copyright 2001-2010 Gentoo Foundation
Mike Frysinger <vapier@gentoo.org>
(with plenty of ideas stolen from other projects/distros)
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2012-11-22 4:20 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2012-11-22 4:20 UTC (permalink / raw
To: gentoo-commits
vapier 12/11/22 04:20:15
Modified: lesspipe.sh
Log:
Pass the -d flag to lzip for .lz files #444122 by Vincent Tai.
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)
Revision Changes Path
1.49 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.49&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.49&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.48&r2=1.49
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- lesspipe.sh 4 Sep 2012 19:13:58 -0000 1.48
+++ lesspipe.sh 22 Nov 2012 04:20:15 -0000 1.49
@@ -13,7 +13,7 @@
case "$1" in
*.gz|*.z) echo "gunzip -c" ;;
*.bz2|*.bz) echo "bunzip2 -c" ;;
- *.lz) echo "lzip -c" ;;
+ *.lz) echo "lzip -dc" ;;
*.lzma) echo "unlzma -c" ;;
*.xz) echo "xzdec" ;;
*) echo "cat" ;;
@@ -233,7 +233,7 @@
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
cat <<-EOF
- $Id: lesspipe.sh,v 1.48 2012/09/04 19:13:58 vapier Exp $
+ $Id: lesspipe.sh,v 1.49 2012/11/22 04:20:15 vapier Exp $
Copyright 2001-2010 Gentoo Foundation
Mike Frysinger <vapier@gentoo.org>
(with plenty of ideas stolen from other projects/distros)
@@ -243,7 +243,7 @@
less -V
elif [[ $1 == "-h" || $1 == "--help" ]] ; then
cat <<-EOF
- lesspipe: preproccess files before sending them to less
+ lesspipe: preprocess files before sending them to less
Usage: lesspipe <file>
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2013-03-24 5:01 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2013-03-24 5:01 UTC (permalink / raw
To: gentoo-commits
vapier 13/03/24 05:01:41
Modified: lesspipe.sh
Log:
Add lzo support, and xz compressed man pages.
(Portage version: 2.2.0_alpha164/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)
Revision Changes Path
1.51 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.51&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.51&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.50&r2=1.51
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- lesspipe.sh 30 Jan 2013 07:08:38 -0000 1.50
+++ lesspipe.sh 24 Mar 2013 05:01:40 -0000 1.51
@@ -15,6 +15,7 @@
*.bz2|*.bz) echo "bunzip2 -c" ;;
*.lz) echo "lzip -dc" ;;
*.lzma) echo "unlzma -c" ;;
+ *.lzo) echo "lzop -dc" ;;
*.xz) echo "xzdec" ;;
*) echo "cat" ;;
esac
@@ -46,7 +47,7 @@
local match=$2
[[ -z ${match} ]] && match=$1
- local DECOMPRESSOR=$(guesscompress "$match")
+ local DECOMPRESSOR=$(guesscompress "${match}")
# User filters
if [[ -x ~/.lessfilter ]] ; then
@@ -58,13 +59,14 @@
[[ ${match} == *.${ignore} ]] && exit 0
done
- case "$match" in
+ case "${match}" in
### Doc files ###
*.[0-9n]|*.man|\
*.[0-9n].bz2|*.man.bz2|\
*.[0-9n].gz|*.man.gz|\
*.[0-9n].lzma|*.man.lzma|\
+ *.[0-9n].xz|*.man.xz|\
*.[0-9][a-z].gz|*.[0-9][a-z].gz)
local out=$(${DECOMPRESSOR} -- "$1" | file -)
case ${out} in
@@ -233,8 +235,8 @@
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
cat <<-EOF
- $Id: lesspipe.sh,v 1.50 2013/01/30 07:08:38 vapier Exp $
- Copyright 2001-2010 Gentoo Foundation
+ $Id: lesspipe.sh,v 1.51 2013/03/24 05:01:40 vapier Exp $
+ Copyright 2001-2013 Gentoo Foundation
Mike Frysinger <vapier@gentoo.org>
(with plenty of ideas stolen from other projects/distros)
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2013-04-29 18:37 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2013-04-29 18:37 UTC (permalink / raw
To: gentoo-commits
vapier 13/04/29 18:37:49
Modified: lesspipe.sh
Log:
Add webm/webp formats.
(Portage version: 2.2.0_alpha170/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)
Revision Changes Path
1.52 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.52&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.52&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.51&r2=1.52
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- lesspipe.sh 24 Mar 2013 05:01:40 -0000 1.51
+++ lesspipe.sh 29 Apr 2013 18:37:49 -0000 1.52
@@ -151,10 +151,10 @@
*.squashfs) unsquashfs -s "$1" && unsquashfs -ll "$1" ;;
### Media ###
- *.bmp|*.gif|*.jpeg|*.jpg|*.ico|*.pcd|*.pcx|*.png|*.ppm|*.tga|*.tiff|*.tif)
+ *.bmp|*.gif|*.jpeg|*.jpg|*.ico|*.pcd|*.pcx|*.png|*.ppm|*.tga|*.tiff|*.tif|*.webp)
identify "$1" || file -L -- "$1"
;;
- *.avi|*.mpeg|*.mpg|*.mov|*.qt|*.wmv|*.asf|*.rm|*.ram)
+ *.asf|*.avi|*.mov|*.mp4|*.mpeg|*.mpg|*.qt|*.ram|*.rm|*.webm|*.wmv)
midentify "$1" || file -L -- "$1"
;;
*.mp3) mp3info "$1" || id3info "$1" ;;
@@ -235,7 +235,7 @@
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
cat <<-EOF
- $Id: lesspipe.sh,v 1.51 2013/03/24 05:01:40 vapier Exp $
+ $Id: lesspipe.sh,v 1.52 2013/04/29 18:37:49 vapier Exp $
Copyright 2001-2013 Gentoo Foundation
Mike Frysinger <vapier@gentoo.org>
(with plenty of ideas stolen from other projects/distros)
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2013-08-06 21:35 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2013-08-06 21:35 UTC (permalink / raw
To: gentoo-commits
vapier 13/08/06 21:35:30
Modified: lesspipe.sh
Log:
Handle csr/crt files with openssl.
(Portage version: 2.2.0_alpha179/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)
Revision Changes Path
1.53 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.53&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.53&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.52&r2=1.53
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- lesspipe.sh 29 Apr 2013 18:37:49 -0000 1.52
+++ lesspipe.sh 6 Aug 2013 21:35:30 -0000 1.53
@@ -183,7 +183,8 @@
### Encryption stuff ###
*.crl) openssl crl -hash -text -noout -in "$1" ;;
- *.pem) openssl x509 -hash -text -noout -in "$1" ;;
+ *.csr) openssl req -text -noout -in "$1" ;;
+ *.crt|*.pem) openssl x509 -hash -text -noout -in "$1" ;;
# May not be such a good idea :)
# ### Device nodes ###
@@ -235,7 +236,7 @@
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
cat <<-EOF
- $Id: lesspipe.sh,v 1.52 2013/04/29 18:37:49 vapier Exp $
+ $Id: lesspipe.sh,v 1.53 2013/08/06 21:35:30 vapier Exp $
Copyright 2001-2013 Gentoo Foundation
Mike Frysinger <vapier@gentoo.org>
(with plenty of ideas stolen from other projects/distros)
^ permalink raw reply [flat|nested] 29+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh
@ 2013-12-31 2:25 Mike Frysinger (vapier)
0 siblings, 0 replies; 29+ messages in thread
From: Mike Frysinger (vapier) @ 2013-12-31 2:25 UTC (permalink / raw
To: gentoo-commits
vapier 13/12/31 02:25:30
Modified: lesspipe.sh
Log:
Fallback to rpm2tar when rpm is not available
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)
Revision Changes Path
1.54 sys-apps/less/files/lesspipe.sh
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.54&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.54&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.53&r2=1.54
Index: lesspipe.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- lesspipe.sh 6 Aug 2013 21:35:30 -0000 1.53
+++ lesspipe.sh 31 Dec 2013 02:25:30 -0000 1.54
@@ -117,7 +117,7 @@
*.gz|*.z|\
*.lz|\
*.lzma|*.xz) ${DECOMPRESSOR} -- "$1" ;;
- *.rpm) rpm -qpivl --changelog -- "$1" ;;
+ *.rpm) rpm -qpivl --changelog -- "$1" || rpm2tar -O "$1" | tar tvvf -;;
*.cpi|*.cpio) cpio -itv < "$1" ;;
*.ace) unace l "$1" ;;
*.arc) arc v "$1" ;;
@@ -236,7 +236,7 @@
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
Id="cvsid"
cat <<-EOF
- $Id: lesspipe.sh,v 1.53 2013/08/06 21:35:30 vapier Exp $
+ $Id: lesspipe.sh,v 1.54 2013/12/31 02:25:30 vapier Exp $
Copyright 2001-2013 Gentoo Foundation
Mike Frysinger <vapier@gentoo.org>
(with plenty of ideas stolen from other projects/distros)
^ permalink raw reply [flat|nested] 29+ messages in thread
end of thread, other threads:[~2013-12-31 2:25 UTC | newest]
Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-07 20:29 [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh Mike Frysinger (vapier)
-- strict thread matches above, loose matches on Subject: below --
2013-12-31 2:25 Mike Frysinger (vapier)
2013-08-06 21:35 Mike Frysinger (vapier)
2013-04-29 18:37 Mike Frysinger (vapier)
2013-03-24 5:01 Mike Frysinger (vapier)
2012-11-22 4:20 Mike Frysinger (vapier)
2012-09-04 19:13 Mike Frysinger (vapier)
2011-10-09 19:19 Mike Frysinger (vapier)
2011-01-20 3:26 Mike Frysinger (vapier)
2011-01-18 20:26 Mike Frysinger (vapier)
2010-12-31 20:52 Mike Frysinger (vapier)
2010-12-31 20:51 Mike Frysinger (vapier)
2010-08-24 1:01 Mike Frysinger (vapier)
2010-03-23 20:54 Mike Frysinger (vapier)
2010-02-14 17:11 Mike Frysinger (vapier)
2010-02-10 23:57 Mike Frysinger (vapier)
2010-02-05 6:36 Mike Frysinger (vapier)
2009-10-22 7:53 Mike Frysinger (vapier)
2009-04-11 23:20 Mike Frysinger (vapier)
2009-03-13 6:06 Mike Frysinger (vapier)
2009-02-09 18:58 Mike Frysinger (vapier)
2009-02-02 19:44 Mike Frysinger (vapier)
2008-12-27 5:03 Mike Frysinger (vapier)
2008-05-30 23:54 Mike Frysinger (vapier)
2008-04-18 19:58 Mike Frysinger (vapier)
2008-04-16 17:33 Mike Frysinger (vapier)
2008-03-16 13:01 Mike Frysinger (vapier)
2007-11-06 2:19 Mike Frysinger (vapier)
2007-11-06 1:58 Mike Frysinger (vapier)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox