fix(extract): properly handle xz archives

`unxz` by itself extracts `path/file.xz` to `path/file`, removing the
archive in the process. This clashes with the plugins behaviour to
extract into the current directory and keeping the archive by default.
This commit is contained in:
xs 2026-07-05 09:11:44 +00:00
commit 68d6a9efe7
No known key found for this signature in database
GPG key ID: 4BD8C5114E02B0BB

View file

@ -102,7 +102,7 @@ EOF
(*.tar.lrz) (( $+commands[lrzuntar] )) && lrzuntar "$full_path" ;;
(*.gz) (( $+commands[pigz] )) && pigz -cdk "$full_path" > "${file:t:r}" || gunzip -ck "$full_path" > "${file:t:r}" ;;
(*.bz2) (( $+commands[pbzip2] )) && pbzip2 -d "$full_path" || bunzip2 "$full_path" ;;
(*.xz) unxz "$full_path" ;;
(*.xz) xzcat "$full_path" > "${file:t:r}" ;;
(*.lrz) (( $+commands[lrunzip] )) && lrunzip "$full_path" ;;
(*.lz4) lz4 -d "$full_path" ;;
(*.lzma) unlzma "$full_path" ;;