summaryrefslogtreecommitdiff
path: root/home/.oh-my-zsh/plugins/extract/_extract
diff options
context:
space:
mode:
authornavewindre <boneyaard@gmail.com>2025-07-13 06:42:05 +0200
committernavewindre <boneyaard@gmail.com>2025-07-13 06:42:05 +0200
commit02f14a9cb152561a5e44062aac79f3b700403b40 (patch)
tree2db8ebda3b7f6f8777783aeb5c60018e6e1359d8 /home/.oh-my-zsh/plugins/extract/_extract
parentcbbdeb2f6b40a102a829f0c47cff052937231f00 (diff)
omz
Diffstat (limited to 'home/.oh-my-zsh/plugins/extract/_extract')
-rw-r--r--home/.oh-my-zsh/plugins/extract/_extract54
1 files changed, 54 insertions, 0 deletions
diff --git a/home/.oh-my-zsh/plugins/extract/_extract b/home/.oh-my-zsh/plugins/extract/_extract
new file mode 100644
index 0000000..0b43e86
--- /dev/null
+++ b/home/.oh-my-zsh/plugins/extract/_extract
@@ -0,0 +1,54 @@
+#compdef extract
+#autoload
+
+local -a exts=(
+ 7z
+ aar
+ apk
+ bz2
+ cab
+ cpio
+ crx
+ 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
+ vsix
+ war
+ whl
+ xpi
+ xz
+ Z
+ zip
+ zpaq
+ zst
+)
+
+_arguments \
+ '(-r --remove)'{-r,--remove}'[Remove archive.]' \
+ "*::archive file:_files -g '(#i)*.(${(j:|:)exts})(-.)'" \
+ && return 0