Diff
1diff --git a/plugins/extract/README.md b/plugins/extract/README.md
2index a6630de3fa11c94ffa2427406350365f58800950..81e8e1d23448a00d7d3cd10b2be3362560a7f40d 100644
3--- a/plugins/extract/README.md
4+++ b/plugins/extract/README.md
5@@ -26,6 +26,7 @@ plugins=(... extract)
6 | `ipsw` | iOS firmware file |
7 | `jar` | Java Archive |
8 | `lrz` | LRZ archive |
9+| `lz4` | LZ4 archive |
10 | `lzma` | LZMA archive |
11 | `rar` | WinRAR archive |
12 | `rpm` | RPM package |
13@@ -35,6 +36,7 @@ plugins=(... extract)
14 | `tar.gz` | Tarball with gzip compression |
15 | `tar.lrz` | Tarball with lrzip compression |
16 | `tar.lz` | Tarball with lzip compression |
17+| `tar.lz4` | Tarball with lz4 compression |
18 | `tar.xz` | Tarball with lzma2 compression |
19 | `tar.zma` | Tarball with lzma compression |
20 | `tar.zst` | Tarball with zstd compression |
21diff --git a/plugins/extract/_extract b/plugins/extract/_extract
22index 034fe6df0126c04da23f69f1b1fb9b583c915ee5..1a263a74428730ec6513d526de3eac4c0f1e35f4 100644
23--- a/plugins/extract/_extract
24+++ b/plugins/extract/_extract
25@@ -3,5 +3,5 @@
26
27 _arguments \
28 '(-r --remove)'{-r,--remove}'[Remove archive.]' \
29- "*::archive file:_files -g '(#i)*.(7z|Z|apk|aar|bz2|deb|gz|ipsw|jar|lrz|lzma|rar|rpm|sublime-package|tar|tar.bz2|tar.gz|tar.lrz|tar.lz|tar.xz|tar.zma|tar.zst|tbz|tbz2|tgz|tlz|txz|tzst|war|whl|xpi|xz|zip|zst)(-.)'" \
30+ "*::archive file:_files -g '(#i)*.(7z|Z|apk|aar|bz2|deb|gz|ipsw|jar|lrz|lz4|lzma|rar|rpm|sublime-package|tar|tar.bz2|tar.gz|tar.lrz|tar.lz|tar.lz4|tar.xz|tar.zma|tar.zst|tbz|tbz2|tgz|tlz|txz|tzst|war|whl|xpi|xz|zip|zst)(-.)'" \
31 && return 0
32diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh
33index 349c9a7762b181ef84b448512a47008e7be6117b..a5594b81aaf41a6a40edf207cd0e163f2bf44dc7 100644
34--- a/plugins/extract/extract.plugin.zsh
35+++ b/plugins/extract/extract.plugin.zsh
36@@ -46,11 +46,13 @@ extract() {
37 || zstdcat "$1" | tar xvf - ;;
38 (*.tar) tar xvf "$1" ;;
39 (*.tar.lz) (( $+commands[lzip] )) && tar xvf "$1" ;;
40+ (*.tar.lz4) lz4 -c -d "$1" | tar xvf - ;;
41 (*.tar.lrz) (( $+commands[lrzuntar] )) && lrzuntar "$1" ;;
42 (*.gz) (( $+commands[pigz] )) && pigz -dk "$1" || gunzip -k "$1" ;;
43 (*.bz2) bunzip2 "$1" ;;
44 (*.xz) unxz "$1" ;;
45 (*.lrz) (( $+commands[lrunzip] )) && lrunzip "$1" ;;
46+ (*.lz4) lz4 -d "$1" ;;
47 (*.lzma) unlzma "$1" ;;
48 (*.z) uncompress "$1" ;;
49 (*.zip|*.war|*.jar|*.sublime-package|*.ipsw|*.xpi|*.apk|*.aar|*.whl) unzip "$1" -d $extract_dir ;;