1
0
Fork 0
mirror of synced 2024-06-17 06:11:09 -04:00
zimfw/modules/archive/init.zsh
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

18 lines
365 B
Bash

#
# Archive aliases
#
# if pigz/pbzip2 are available, alias them as they are drop-in replacements for gzip and bzip2, respectively.
#
# pigz
#
(( ${+commands[pigz]} )) && alias gzip='pigz'
(( ${+commands[unpigz]} )) && alias gunzip='unpigz'
#
# pbzip2
#
(( ${+commands[pbzip2]} )) && alias bzip2='pbzip2'
(( ${+commands[pbunzip2]} )) && alias bunzip2='pbunzip2'