X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=ea67451ed91f2c83b229f63b0fcf6fe6f12c5fde;hb=a9d3f362e00b85b8cc76fab6054191841d75e044;hp=b43a99d2d0500518519c9ca505d0d7381e8dda3b;hpb=b4c73df2ca5d960293f8c9e5c47d5f39e7b4c62c;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index b43a99d..ea67451 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -2536,46 +2536,6 @@ _simple_extract() compdef _simple_extract simple-extract alias se=simple-extract -# Usage: smartcompress () -#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 -#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() {