Home

Awesome

extract plugin

This plugin defines a function called extract that extracts the archive file you pass it, and it supports a wide variety of archive filetypes.

This way you don't have to know what specific command extracts a file, you just do extract <filename> and the function takes care of the rest.

To use it, add to the plugins array in your zshrc file:

source /usr/share/zsh/plugins/zsh-extract/extract.plugin.zsh

Supported file extensions

ExtensionDescription
7z7zip file
ZZ archive (LZW)
apkAndroid app file
aarAndroid library file
bz2Bzip2 file
debDebian package
gzGzip file
ipswiOS firmware file
jarJava Archive
lzmaLZMA archive
rarWinRAR archive
rpmRPM package
sublime-packageSublime Text package
tarTarball
tar.bz2Tarball with bzip2 compression
tar.gzTarball with gzip compression
tar.lzTarball with lzip compression
tar.xzTarball with lzma2 compression
tar.zmaTarball with lzma compression
tar.zstTarball with zstd compression
tbzTarball with bzip compression
tbz2Tarball with bzip2 compression
tgzTarball with gzip compression
tlzTarball with lzma compression
txzTarball with lzma2 compression
tzstTarball with zstd compression
warWeb Application archive (Java-based)
xpiMozilla XPI module file
xzLZMA2 archive
zipZip archive
zstZstandard file (zstd)

See list of archive formats for more information regarding archive formats.