+local -A filetype; filetype=(\
+ bz2cpio "cpio archive *bzip2*"
+ cpiogz "cpio archive *gzip*"
+ tarbz2 "*tar archive*bzip2*"
+ targz "*tar archive*gzip*"
+ tarz "*POSIX tar archive \(compress\'d data 16 bits\)*"
+ bz2 "*\(bzip2 compressed data*"
+ tar "*tar*"
+ gz "*gzip*"
+ 7zip "*7-zip archive data*"
+ arj "ARJ archive data*"
+ zip "*Zip archive data*"
+ Z "*compress'd data 16 bits*"
+ deb "Debian binary package*"
+ uu "*uuencoded*xxencoded*"
+ lzo "lzop compressed data - *"
+ cpio "cpio archive"
+ rar "RAR archive data*"
+ cab "CAB file"
+ #rpm "$file: *RPM*"
+)
+
+tarlist='/usr/bin/env tar -tvf' ; tarextract='/usr/bin/env tar -C $whereto -xvf'
+tarbz2list='/usr/bin/env tar -tvjf' ; tarbz2extract='/usr/bin/env tar -C ${whereto:-$PWD} -xvjf'
+targzlist='/usr/bin/env tar -tvzf' ; targzextract='/usr/bin/env tar -C $whereto -xvzf'
+gzlist='/usr/bin/env gzip -lv' ; gzextract='/usr/bin/env gzip -dc'
+tarzlist='/usr/bin/env tar -tvZf' ; tarzextract='/usr/bin/env tar -C $whereto -xvZf'
+tarcompresslist='/usr/bin/env tar -tvZf' ; tarcompressextract='/usr/bin/env tar -$ whereto -xvZf'
+#cpiobz2list='bzip2 -cd $file | cpio -ivt'; cpiobz2extract='bzip2 -cd $CWD/$file | cpio -idv'
+#cpiogzlist='gzip -cd $file | cpio -tv'
+#cpiogzextract='gzip -cd $file | cpio -ivd'
+cpiogz='/usr/bin/env star tzvf' ; cpiogzextract='/usr/bin/env star xzvf'
+_7ziplist='/usr/bin/env 7zr l' ; _7zipextract='/usr/bin/env 7zr e -o$whereto'
+arjlist='/usr/bin/env arj l' ; arjextract='/usr/bin/env arj e -e $CWD/$file'
+compresslist='/usr/bin/env uncompress -l' ; compressextract='/usr/bin/env uncompress -cv'
+lhalist='/usr/bin/env lha -l' ; lhaextract='/usr/bin/env lha -xw=$whereto'
+deblist='/usr/bin/env dpkg-deb -c' ; debextract='/usr/bin/env dpkg -X'
+lzolist='/usr/bin/env lzop -l' ; lzoextract='/usr/bin/env lzop -dN -p$whereto'
+cpiolist='/usr/bin/env cpio -t' ; cpioextract='/usr/bin/env cpio -idv'
+rarlist='/usr/bin/env unrar lb' ; rarextract='/usr/bin/env unrar e'
+cablist='/usr/bin/env cabextract -l' ; cabextract='/usr/bin/env cabextract -d $whereto'
+#rpmlist='/usr/bin/env rpm2cpio #rpmextract=
+ziplist='/usr/bin/env unzip -l' ; zipextract='/usr/bin/env unzip -d $whereto'
+
+
+# ------------------------------------------------- functions
+put_there() {
+ vared -p "
+ ${col2}Where should I extract to?
+ ${col4}( Non existing directories will be created,
+ completion works as do usual editing commands )$defcol
+ " whereto && test -d $whereto \
+ || builtin mkdir -p $whereto
+}
+# -------------------------------------------end of functions
+
+(( ${+PAGER} )) || local PAGER=less
+
+
+ if [[ -f $file ]]