diff options
author | Corey Hinkle <bugg123@gmail.com> | 2021-05-28 05:27:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-28 11:27:16 +0200 |
commit | 706b2f3765d41bee2853b17724888d1a3f6f00d9 (patch) | |
tree | b8fdd40963f8f97a6fbbe861bc4b17b945ab8293 | |
parent | c95b4a393a9eb4f4a4ca0535ed500bdf5e2fbe96 (diff) | |
download | zsh-706b2f3765d41bee2853b17724888d1a3f6f00d9.tar.gz zsh-706b2f3765d41bee2853b17724888d1a3f6f00d9.tar.bz2 zsh-706b2f3765d41bee2853b17724888d1a3f6f00d9.zip |
feat(extract): add support for .ear files (#9901)
Co-authored-by: Corey Hinkle <corey.hinkle@five9.com>
-rw-r--r-- | plugins/extract/README.md | 1 | ||||
-rw-r--r-- | plugins/extract/_extract | 2 | ||||
-rw-r--r-- | plugins/extract/extract.plugin.zsh | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/plugins/extract/README.md b/plugins/extract/README.md index b2b731e39..f2e6ad1d1 100644 --- a/plugins/extract/README.md +++ b/plugins/extract/README.md @@ -22,6 +22,7 @@ plugins=(... extract) | `aar` | Android library file | | `bz2` | Bzip2 file | | `deb` | Debian package | +| `ear` | Enterprise Application aRchive | | `gz` | Gzip file | | `ipa` | iOS app package | | `ipsw` | iOS firmware file | diff --git a/plugins/extract/_extract b/plugins/extract/_extract index f96f0d450..267c4d4e1 100644 --- a/plugins/extract/_extract +++ b/plugins/extract/_extract @@ -3,5 +3,5 @@ _arguments \ '(-r --remove)'{-r,--remove}'[Remove archive.]' \ - "*::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)(-.)'" \ + "*::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)(-.)'" \ && return 0 diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh index 46e69f08d..e390e2dcc 100644 --- a/plugins/extract/extract.plugin.zsh +++ b/plugins/extract/extract.plugin.zsh @@ -55,7 +55,7 @@ extract() { (*.lz4) lz4 -d "$1" ;; (*.lzma) unlzma "$1" ;; (*.z) uncompress "$1" ;; - (*.zip|*.war|*.jar|*.sublime-package|*.ipa|*.ipsw|*.xpi|*.apk|*.aar|*.whl) unzip "$1" -d $extract_dir ;; + (*.zip|*.war|*.jar|*.ear|*.sublime-package|*.ipa|*.ipsw|*.xpi|*.apk|*.aar|*.whl) unzip "$1" -d $extract_dir ;; (*.rar) unrar x -ad "$1" ;; (*.rpm) mkdir "$extract_dir" && cd "$extract_dir" && rpm2cpio "../$1" | cpio --quiet -id && cd .. ;; (*.7z) 7za x "$1" ;; |