That looks really nice. I have something in my .$SHELLrc file that does something similar:
the extract_archive() in http://github.com/Rydgel/archlinux/blob/master/.zshrc
but yours looks like it takes care of other things like archives within archives.