[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: less: extra entries for lesspipe



Hi,
	Oh. Well, I have a local lessopen script that takes precedence
 over the /usr/bin things. I like seeing as much of the stuff as
 possible (like looking at tar files one can read the README file
 without having to untar and read and delete stuff later?)

	I do not think my particular lessopen is a godd default
 either; I woud like the default to be minimalistic with the least
 surprise principle (strings for a binarty is not least surprise)

	manoj
-- 
 Justice is incidental to law and order. Edgar Hoover
Manoj Srivastava  <srivasta@acm.org> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E


#!/bin/sh
case "$1" in
    *.tar.gz|*.tgz|*.tar.Z)
	tar tzvvf $1 
	zcat $1 
	;;
    *.Z|*.gz)
	gunzip -c $1
	;;
    *.bz2)
	bunzip2 -ckd $1
	;;
    *.bz)
	bunzip -ckd $1
	;;
    *.tar)
	tar tvf $1 
	cat $1
	;;
    *.deb)
	echo "$1:"; 
	dpkg --info $1; 
	echo -e '\n*** Contents:'; 
	dpkg-deb --contents $1 
	;;
    *.zip|*.ZIP)
	if [ -x /usr/bin/unzip ]; then 
	    unzip -v $1; 
	else 
	    echo "No unzip available"; 
	fi 
	;;
    *.arj|*.ARJ)
	if [  -x /usr/bin/unarj ]; then
	    unarj -v $1;
	else
	    echo "No unarj available";
	fi
	;;
    *.gif|*.jpeg|*.jpg|*.pcd|*.png|*.tga|*.tiff|*.tif)
	if [ -x /usr/X11R6/bin/identify ]; then 
	    /usr/X11R6/bin/identify $1;
	else 
	    echo -e "No identify available
	    echo -e Install ImageMagick to browse images"; 
	fi 
	;;
esac



--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: