[issue982] update/modernize zsh functions simple-extractor, smartcompress & ogg2mp3

Frank Terbeck bts at bts.grml.org
Mon May 9 22:49:43 CEST 2011


Frank Terbeck <ft at grml.org> added the comment:

Bernhard Tittelbach wrote:
[...]
> +      *.(tar.bz2|tbz2|tbz))     eval tar -xvjf $ARCHIVE               ;;
> +      *.(tar.gz|tgz))           eval tar -xvzf $ARCHIVE               ;;
> +      *.(tar.xz|txz|tar.lzma))  eval tar -xvJf $ARCHIVE               ;;
> +      *.tar)                    eval tar -xvf $ARCHIVE                ;;
> +      *.rar)                    eval unrar x $SEEKABLEARCHIVE         ;;
> +      *.lzh)                    eval lha x $SEEKABLEARCHIVE           ;;
> +      *.(zip|jar))              eval unzip $SEEKABLEARCHIVE           ;;
> +      *.deb)                    eval ar -x $SEEKABLEARCHIVE           ;;
> +      *.bz2)                    eval bzip2 -d -c $ARCHIVE > $GZTARGET ;;
> +      *.(gz|Z))                 eval gzip -d -c $SEEKABLEARCHIVE > $GZTARGET  ;;
> +      *.(xz|lzma))              eval xz -d -c $ARCHIVE > $GZTARGET    ;;
> +      *.7z)                     eval 7z x $SEEKABLEARCHIVE            ;;
> +      *)                        print "Error: '$1' has unknown archive type." >&2 ;;

Also, `eval' should never be used. I mean...

  % simple-extract 'foo.tar.gz;echo I could have rmed your \~.gz'

We've been talking about this a little on IRC, and it's probably not
worth going through a lot of trouble to save one manual `wget'.

Not with `eval' in any case.

Regards, Frank

----------
assignedto: ft
files: ogg2mp3.zshrc.patch, simple-extractor.zshrc.patch
messages: 3745, 3746, 3747, 3768, 3769, 3770
nosy: btittelbach, ft
priority: feature
status: chatting
title: update/modernize zsh functions simple-extractor, smartcompress & ogg2mp3
topic: zsh

_____________________________________
GRML issue tracker <bts at bts.grml.org>
<http://bts.grml.org/grml/issue982>
_____________________________________


More information about the Bugs-changes mailing list