mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-25 01:03:41 +01:00
feat(extract): add pbzip2
and pixz
(#11435)
This commit is contained in:
parent
df658350a3
commit
4b5076b5ec
@ -30,12 +30,15 @@ EOF
|
||||
local extract_dir="${1:t:r}"
|
||||
local file="$1" full_path="${1:A}"
|
||||
case "${file:l}" in
|
||||
(*.tar.gz|*.tgz) (( $+commands[pigz] )) && { pigz -dc "$file" | tar xv } || tar zxvf "$file" ;;
|
||||
(*.tar.bz2|*.tbz|*.tbz2) tar xvjf "$file" ;;
|
||||
(*.tar.gz|*.tgz)
|
||||
(( $+commands[pigz] )) && { tar -I pigz -xvf "$file" } || tar zxvf "$file" ;;
|
||||
(*.tar.bz2|*.tbz|*.tbz2)
|
||||
(( $+commands[pbzip2] )) && { tar -I pbzip2 -xvf "$file" } || tar xvjf "$file" ;;
|
||||
(*.tar.xz|*.txz)
|
||||
(( $+commands[pixz] )) && { tar -I pixz -xvf "$file" } || {
|
||||
tar --xz --help &> /dev/null \
|
||||
&& tar --xz -xvf "$file" \
|
||||
|| xzcat "$file" | tar xvf - ;;
|
||||
|| xzcat "$file" | tar xvf - } ;;
|
||||
(*.tar.zma|*.tlz)
|
||||
tar --lzma --help &> /dev/null \
|
||||
&& tar --lzma -xvf "$file" \
|
||||
|
Loading…
Reference in New Issue
Block a user