diff --git a/plugins/extract/README.md b/plugins/extract/README.md index 7bedfb1c6..9cc688f6a 100644 --- a/plugins/extract/README.md +++ b/plugins/extract/README.md @@ -45,6 +45,7 @@ plugins=(... extract) | `tar.lrz` | Tarball with lrzip compression | | `tar.lz` | Tarball with lzip compression | | `tar.lz4` | Tarball with lz4 compression | +| `tar.lzma` | Tarball with lzma compression | | `tar.xz` | Tarball with lzma2 compression | | `tar.zma` | Tarball with lzma compression | | `tar.zst` | Tarball with zstd compression | diff --git a/plugins/extract/_extract b/plugins/extract/_extract index 7d71aeb1b..7e89ba98a 100644 --- a/plugins/extract/_extract +++ b/plugins/extract/_extract @@ -31,6 +31,7 @@ local -a exts=( tar.lrz tar.lz tar.lz4 + tar.lzma tar.xz tar.zma tar.zst diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh old mode 100755 new mode 100644 index bd8e73d6e..51a4522ed --- a/plugins/extract/extract.plugin.zsh +++ b/plugins/extract/extract.plugin.zsh @@ -88,7 +88,7 @@ EOF tar --xz --help &> /dev/null \ && tar --xz -xvf "$full_path" \ || xzcat "$full_path" | tar xvf - } ;; - (*.tar.zma|*.tlz) + (*.tar.lzma|*.tar.zma|*.tlz) tar --lzma --help &> /dev/null \ && tar --lzma -xvf "$full_path" \ || lzcat "$full_path" | tar xvf - ;; diff --git a/plugins/extract/tests/extract.test.zsh b/plugins/extract/tests/extract.test.zsh index 180fce046..9d8f2485b 100644 --- a/plugins/extract/tests/extract.test.zsh +++ b/plugins/extract/tests/extract.test.zsh @@ -167,7 +167,11 @@ check_deb_multiple() { printf '\037\235\220\150\312\260\141\363\106\001' \ > "$test_dir/fixture.Z" - for extension in lzma Z; do + cp "$test_dir/plain" "$test_dir/sample.txt" + tar -cf "$test_dir/fixture.tar" -C "$test_dir" sample.txt + lzma -c "$test_dir/fixture.tar" > "$test_dir/fixture.tar.lzma" + + for extension in lzma Z tar.lzma; do for mode in default target remove; do check_extract "$extension" "$mode" done