diff options
author | Marc Cornellà <hello@mcornella.com> | 2021-08-04 15:49:11 +0200 |
---|---|---|
committer | Marc Cornellà <hello@mcornella.com> | 2021-08-14 22:32:04 +0200 |
commit | 6dc937ff685fcbc43056dbd7fb05ba01c56dfd1a (patch) | |
tree | dd352dd3e8460a81eb9a6f7bf70c9001689cb55f /plugins/extract/extract.plugin.zsh | |
parent | af6c7f3d6782cf0a34e4e68f661df526d35795be (diff) | |
download | zsh-6dc937ff685fcbc43056dbd7fb05ba01c56dfd1a.tar.gz zsh-6dc937ff685fcbc43056dbd7fb05ba01c56dfd1a.tar.bz2 zsh-6dc937ff685fcbc43056dbd7fb05ba01c56dfd1a.zip |
feat(extract): add suport for .cab files via `cabextract`
Diffstat (limited to 'plugins/extract/extract.plugin.zsh')
-rw-r--r-- | plugins/extract/extract.plugin.zsh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh index e390e2dcc..601272cac 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|*.ear|*.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" ;; @@ -69,6 +69,7 @@ extract() { cd .. ;; (*.zst) unzstd "$1" ;; + (*.cab) cabextract -d "$extract_dir" "$1" ;; (*) echo "extract: '$1' cannot be extracted" >&2 success=1 |