diff options
Diffstat (limited to 'plugins/extract')
-rw-r--r-- | plugins/extract/README.md | 1 | ||||
-rw-r--r-- | plugins/extract/_extract | 2 | ||||
-rw-r--r-- | plugins/extract/extract.plugin.zsh | 6 |
3 files changed, 5 insertions, 4 deletions
diff --git a/plugins/extract/README.md b/plugins/extract/README.md index c6bdd36dd..83b878c32 100644 --- a/plugins/extract/README.md +++ b/plugins/extract/README.md @@ -19,6 +19,7 @@ plugins=(... extract) | `7z` | 7zip file | | `Z` | Z archive (LZW) | | `apk` | Android app file | +| `aar` | Android library file | | `bz2` | Bzip2 file | | `deb` | Debian package | | `gz` | Gzip file | diff --git a/plugins/extract/_extract b/plugins/extract/_extract index 172425d2c..33d49fcc5 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|bz2|deb|gz|ipsw|jar|lzma|rar|sublime-package|tar|tar.bz2|tar.gz|tar.xz|tar.zma|tbz|tbz2|tgz|tlz|txz|war|xpi|xz|zip)(-.)'" \ + "*::archive file:_files -g '(#i)*.(7z|Z|apk|aar|bz2|deb|gz|ipsw|jar|lzma|rar|sublime-package|tar|tar.bz2|tar.gz|tar.xz|tar.zma|tbz|tbz2|tgz|tlz|txz|war|whl|xpi|xz|zip)(-.)'" \ && return 0 diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh index 34f8d8710..5e9b9ff24 100644 --- a/plugins/extract/extract.plugin.zsh +++ b/plugins/extract/extract.plugin.zsh @@ -29,7 +29,7 @@ extract() { success=0 extract_dir="${1:t:r}" - case "$1" in + case "${1:l}" in (*.tar.gz|*.tgz) (( $+commands[pigz] )) && { pigz -dc "$1" | tar xv } || tar zxvf "$1" ;; (*.tar.bz2|*.tbz|*.tbz2) tar xvjf "$1" ;; (*.tar.xz|*.txz) @@ -45,8 +45,8 @@ extract() { (*.bz2) bunzip2 "$1" ;; (*.xz) unxz "$1" ;; (*.lzma) unlzma "$1" ;; - (*.Z) uncompress "$1" ;; - (*.zip|*.war|*.jar|*.sublime-package|*.ipsw|*.xpi|*.apk) unzip "$1" -d $extract_dir ;; + (*.z) uncompress "$1" ;; + (*.zip|*.war|*.jar|*.sublime-package|*.ipsw|*.xpi|*.apk|*.aar|*.whl) unzip "$1" -d $extract_dir ;; (*.rar) unrar x -ad "$1" ;; (*.7z) 7za x "$1" ;; (*.deb) |