1
0
Fork 0
mirror of synced 2024-11-05 08:18:58 -05:00
zimfw/modules/archive
Eric Nielsen 6af7892f91 [archive] Check unrar with commands array
“unrar-free returns the error code 1 when run without arguments, thus
failing the presence check.” as reported at sorin-ionescu/prezto#1383

Reformat code and use one-liners instead of if/then/fi. And we don’t
need to separate local definitions from assignments anymore starting
from zsh 5.2.
2018-02-07 18:27:59 -05:00
..
functions [archive] Check unrar with commands array 2018-02-07 18:27:59 -05:00
init.zsh [archive] Check unrar with commands array 2018-02-07 18:27:59 -05:00
README.md add archive module 2015-12-16 17:00:25 -05:00

Archive

Provides archive and unarchive functions for easy archive manipulation.

This module will make use of pigz and pbzip2 if available to make use of all available CPU cores.

Functions

  • archive generates an archive based on file extension. Syntax is archive myarchive.tar.gz /path/to/archive
  • unarchive unarchives a file based on the extension. Syntax is unarchive myarchive.7z

Archive Formats

Format Requirements
.tar tar
.tar.gz, .tgz tar or pigz
.tar.bz2, .tbz tar or pbzip2
.tar.xz, .txz tar with xz support
.tar.zma, .tlz tar with lzma support
.gz gunzip or pigz
.bz2 bunzip2 or pbzip2
.xz unxz
.lzma unzlma
.Z uncompress
.zip unzip
.rar unrar or rar
.7z 7za