ohmyzsh/plugins/extract/_extract
drjaska 7a0aa439e8
feat(extract): Support .pk{3,4,7} alias file extensions
File extensions .pk3 and .pk4 are renamed zip archives and the file
extension .pk7 is a renamed 7zip file. They can be handled in the same
way as zip and 7zip files.

https://doomwiki.org/wiki/PK3
https://doomwiki.org/wiki/PK4
2025-08-08 02:40:45 +03:00

57 lines
517 B
Text

#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)*.(${(j:|:)exts})(-.)'" \
&& return 0