zshrc: Remove smart-compress
authorFrank Terbeck <ft@bewatermyfriend.org>
Wed, 30 Nov 2011 21:21:30 +0000 (22:21 +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 c43dc23..446f9cb 100644 (file)
@@ -602,11 +602,6 @@ ending. simple-extract will not delete the original archive (even on .gz,.bz2 or
 : **sll()**
 Prints details of symlinks given as arguments.
 
-: **smartcompress()**
-Compresses/archives the file given as first parameter. Takes an optional
-second argument, which denotes the compression/archive type as typical
-filename extension; defaults to "tar.gz".
-
 : **ssl-cert-fingerprints**
 Prints the SHA512, SHA256, SHA1 and MD5 digest of a x509 certificate.
 First and only parameter must be a file containing a certificate. Use
index b43a99d..0cf0f9b 100644 (file)
@@ -2536,27 +2536,6 @@ _simple_extract()
 compdef _simple_extract simple-extract
 alias se=simple-extract
 
-# Usage: smartcompress <file> (<type>)
-#f5# Smart archive creator
-smartcompress() {
-    emulate -L zsh
-    if [[ -n $2 ]] ; then
-        case $2 in
-            tgz | tar.gz)   tar -zcvf$1.$2 $1 ;;
-            tbz2 | tar.bz2) tar -jcvf$1.$2 $1 ;;
-            tar.Z)          tar -Zcvf$1.$2 $1 ;;
-            tar)            tar -cvf$1.$2  $1 ;;
-            gz | gzip)      gzip           $1 ;;
-            bz2 | bzip2)    bzip2          $1 ;;
-            *)
-                echo "Error: $2 is not a valid compression type"
-                ;;
-        esac
-    else
-        smartcompress $1 tar.gz
-    fi
-}
-
 # Usage: show-archive <archive>
 #f5# List an archive's content
 show-archive() {