Back to Ohmyzsh

extract plugin

plugins/extract/README.md

latest3.7 KB
Original Source

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 extract to the plugins array in your zshrc file:

zsh
plugins=(... extract)

Supported file extensions

ExtensionDescription
7z7zip file
apkAndroid app file
aarAndroid library file
bz2Bzip2 file
cabMicrosoft cabinet archive
cpioCpio archive
debDebian package
earEnterprise Application aRchive
exeWindows executable file
gzGzip file
ipaiOS app package
ipswiOS firmware file
jarJava Archive
lrzLRZ archive
lz4LZ4 archive
lzmaLZMA archive
obscpiocpio archive used on OBS
pk3Renamed Zip archive used by Quake games
pk4Renamed Zip archive used by Quake games
pk7Renamed 7zip file used by Quake games
rarWinRAR archive
rpmRPM package
sublime-packageSublime Text package
tarTarball
tar.bz2Tarball with bzip2 compression
tar.gzTarball with gzip compression
tar.lrzTarball with lrzip compression
tar.lzTarball with lzip compression
tar.lz4Tarball with lz4 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
vsixVS Code extension zip file
warWeb Application archive (Java-based)
whlPython wheel file
xpiMozilla XPI module file
xzLZMA2 archive
ZZ archive (LZW)
zipZip archive
zlibzlib archive
zstZstandard file (zstd)
zpaqZpaq file

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