summaryrefslogtreecommitdiff
path: root/plugins/extract/_extract
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/extract/_extract')
-rw-r--r--plugins/extract/_extract52
1 files changed, 51 insertions, 1 deletions
diff --git a/plugins/extract/_extract b/plugins/extract/_extract
index 56b17058f..6641443d3 100644
--- a/plugins/extract/_extract
+++ b/plugins/extract/_extract
@@ -1,7 +1,57 @@
#compdef extract
#autoload
+local -a exts=(
+ 7z
+ aar
+ apk
+ bz2
+ cab
+ cpio
+ crx
+ deb
+ ear
+ gz
+ ipa
+ ipsw
+ jar
+ lrz
+ lz4
+ lzma
+ obscpio
+ pk3
+ pk4
+ pk7
+ 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
+ vsix
+ war
+ whl
+ xpi
+ xz
+ Z
+ zip
+ zpaq
+ zst
+)
+
_arguments \
'(-r --remove)'{-r,--remove}'[Remove archive.]' \
- "*::archive file:_files -g '(#i)*.(7z|Z|apk|aar|bz2|cab|cpio|deb|ear|gz|ipa|ipsw|jar|lrz|lz4|lzma|obscpio|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|zpaq)(-.)'" \
+ "*::archive file:_files -g '(#i)*.(${(j:|:)exts})(-.)'" \
&& return 0