zshrc: Remove `show-archive'
authorFrank Terbeck <ft@bewatermyfriend.org>
Wed, 30 Nov 2011 21:24:12 +0000 (22:24 +0100)
committerMichael Prokop <mika@grml.org>
Tue, 6 Dec 2011 13:50:49 +0000 (14:50 +0100)
Signed-off-by: Frank Terbeck <ft@bewatermyfriend.org>
doc/grmlzshrc.t2t
etc/zsh/zshrc

index 446f9cb..ab7b6e8 100644 (file)
@@ -588,10 +588,6 @@ Reloads functions given as parameters.
 Creates an alias whith sudo prepended, if $EUID is not zero. Run "salias -h"
 for details. See also xunfunction() below.
 
-: **show-archive()**
-Lists the contents of a (compressed) archive with the appropriate programs.
-The choice is made along the filename extension.
-
 : **simple-extract()**
 Tries to uncompress/unpack given files with the appropriate programs. If an URI
 starting with https, http or ftp is provided simple-extract tries to download
index 0cf0f9b..ea67451 100644 (file)
@@ -2536,25 +2536,6 @@ _simple_extract()
 compdef _simple_extract simple-extract
 alias se=simple-extract
 
-# Usage: show-archive <archive>
-#f5# List an archive's content
-show-archive() {
-    emulate -L zsh
-    if [[ -f $1 ]] ; then
-        case $1 in
-            *.tar.gz)      gunzip -c $1 | tar -tf - -- ;;
-            *.tar)         tar -tf $1 ;;
-            *.tgz)         tar -ztf $1 ;;
-            *.zip)         unzip -l $1 ;;
-            *.bz2)         bzless $1 ;;
-            *.deb)         dpkg-deb --fsys-tarfile $1 | tar -tf - -- ;;
-            *)             echo "'$1' Error. Please go away" ;;
-        esac
-    else
-        echo "'$1' is not a valid archive"
-    fi
-}
-
 # TODO: So, this is the third incarnation of this function!?
 #f5# Reload given functions
 refunc() {