706b2f3765d41bee2853b17724888d1a3f6f00d9
- Author
- Corey Hinkle <bugg123@gmail.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
feat(extract): add support for .ear files (#9901)
Co-authored-by: Corey Hinkle <corey.hinkle@five9.com>
Diff
1diff --git a/plugins/extract/README.md b/plugins/extract/README.md
2index b2b731e3978d56632af95773b40af432c65ae8ee..f2e6ad1d1cce34ce427bad276e68c841d76c67f8 100644
3--- a/plugins/extract/README.md
4+++ b/plugins/extract/README.md
5@@ -22,6 +22,7 @@ plugins=(... extract)
6 | `aar` | Android library file |
7 | `bz2` | Bzip2 file |
8 | `deb` | Debian package |
9+| `ear` | Enterprise Application aRchive |
10 | `gz` | Gzip file |
11 | `ipa` | iOS app package |
12 | `ipsw` | iOS firmware file |
13diff --git a/plugins/extract/_extract b/plugins/extract/_extract
14index f96f0d450377bb0f075af90c8152e98844c83250..267c4d4e14cd2d0a95b186b5e3832ad9ef76a219 100644
15--- a/plugins/extract/_extract
16+++ b/plugins/extract/_extract
17@@ -3,5 +3,5 @@
18
19 _arguments \
20 '(-r --remove)'{-r,--remove}'[Remove archive.]' \
21- "*::archive file:_files -g '(#i)*.(7z|Z|apk|aar|bz2|deb|gz|ipa|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)(-.)'" \
22+ "*::archive file:_files -g '(#i)*.(7z|Z|apk|aar|bz2|deb|ear|gz|ipa|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)(-.)'" \
23 && return 0
24diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh
25index 46e69f08dfdf547c7a77951ec87b1d7b2b5c48f6..e390e2dccaff9bc910b0e29f1a2f04dc106967ef 100644
26--- a/plugins/extract/extract.plugin.zsh
27+++ b/plugins/extract/extract.plugin.zsh
28@@ -55,7 +55,7 @@ extract() {
29 (*.lz4) lz4 -d "$1" ;;
30 (*.lzma) unlzma "$1" ;;
31 (*.z) uncompress "$1" ;;
32- (*.zip|*.war|*.jar|*.sublime-package|*.ipa|*.ipsw|*.xpi|*.apk|*.aar|*.whl) unzip "$1" -d $extract_dir ;;
33+ (*.zip|*.war|*.jar|*.ear|*.sublime-package|*.ipa|*.ipsw|*.xpi|*.apk|*.aar|*.whl) unzip "$1" -d $extract_dir ;;
34 (*.rar) unrar x -ad "$1" ;;
35 (*.rpm) mkdir "$extract_dir" && cd "$extract_dir" && rpm2cpio "../$1" | cpio --quiet -id && cd .. ;;
36 (*.7z) 7za x "$1" ;;