ed19f8ffcf93aa58e99af1f144bbd1571931a603

Author
xs5871 <60395129+xs5871@users.noreply.github.com>
Committer
GitHub <noreply@github.com>
Date

Message

fix(extract): properly handle xz archives (#13853)

Diff

 1diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh
 2index 8219f974e3027c12e845b6638200fe4e2dffa2bb..46e97f96a1414c537d5a441c1eccbd1d678a391b 100755
 3--- a/plugins/extract/extract.plugin.zsh
 4+++ b/plugins/extract/extract.plugin.zsh
 5@@ -102,7 +102,7 @@ EOF
 6       (*.tar.lrz) (( $+commands[lrzuntar] )) && lrzuntar "$full_path" ;;
 7       (*.gz) (( $+commands[pigz] )) && pigz -cdk "$full_path" > "${file:t:r}" || gunzip -ck "$full_path" > "${file:t:r}" ;;
 8       (*.bz2) (( $+commands[pbzip2] )) && pbzip2 -d "$full_path" || bunzip2 "$full_path" ;;
 9-      (*.xz) unxz "$full_path" ;;
10+      (*.xz) xzcat "$full_path" > "${file:t:r}" ;;
11       (*.lrz) (( $+commands[lrunzip] )) && lrunzip "$full_path" ;;
12       (*.lz4) lz4 -d "$full_path" ;;
13       (*.lzma) unlzma "$full_path" ;;