From 91b771914bc7c43dd7c7a43b586c5de2c225ceb7 Mon Sep 17 00:00:00 2001 From: kapsh Date: Wed, 28 Jun 2017 11:03:55 +0300 Subject: extract: check file extension as lowercase (#6158) Fixes #6157 --- plugins/extract/extract.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/extract/extract.plugin.zsh') diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh index 34f8d8710..d56044805 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,7 +45,7 @@ extract() { (*.bz2) bunzip2 "$1" ;; (*.xz) unxz "$1" ;; (*.lzma) unlzma "$1" ;; - (*.Z) uncompress "$1" ;; + (*.z) uncompress "$1" ;; (*.zip|*.war|*.jar|*.sublime-package|*.ipsw|*.xpi|*.apk) unzip "$1" -d $extract_dir ;; (*.rar) unrar x -ad "$1" ;; (*.7z) 7za x "$1" ;; -- cgit v1.2.3-70-g09d2 From 5fbf9120935af9b5e81b72f942be09891c6e508f Mon Sep 17 00:00:00 2001 From: Alexander Kapshuna Date: Thu, 9 Aug 2018 19:16:15 +0300 Subject: extract: whl files support (#7045) --- plugins/extract/_extract | 2 +- plugins/extract/extract.plugin.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/extract/extract.plugin.zsh') diff --git a/plugins/extract/_extract b/plugins/extract/_extract index 172425d2c..3baefa339 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|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 d56044805..4c72ce870 100644 --- a/plugins/extract/extract.plugin.zsh +++ b/plugins/extract/extract.plugin.zsh @@ -46,7 +46,7 @@ extract() { (*.xz) unxz "$1" ;; (*.lzma) unlzma "$1" ;; (*.z) uncompress "$1" ;; - (*.zip|*.war|*.jar|*.sublime-package|*.ipsw|*.xpi|*.apk) unzip "$1" -d $extract_dir ;; + (*.zip|*.war|*.jar|*.sublime-package|*.ipsw|*.xpi|*.apk|*.whl) unzip "$1" -d $extract_dir ;; (*.rar) unrar x -ad "$1" ;; (*.7z) 7za x "$1" ;; (*.deb) -- cgit v1.2.3-70-g09d2