Skip to content

Instantly share code, notes, and snippets.

@torsten
Created October 24, 2010 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save torsten/643466 to your computer and use it in GitHub Desktop.
Save torsten/643466 to your computer and use it in GitHub Desktop.
.zshrc lines for a "untar" command which automagically unzips .gz and .bz2 tarballs
untar() {
ruby -e 'f=$*[0];exec"tar","#{f=~/gz$/?"z":(f=~/bz2?$/?"j":
(raise"Incompatible Archive File"))}vxf",f' -- "$@"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment