mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-11 00:10:08 +00:00
feat(extract): add zpaq
support (#11478)
This commit is contained in:
parent
f8bf8f0029
commit
9b91e82560
3 changed files with 3 additions and 1 deletions
|
@ -55,6 +55,7 @@ plugins=(... extract)
|
|||
| `xz` | LZMA2 archive |
|
||||
| `zip` | Zip archive |
|
||||
| `zst` | Zstandard file (zstd) |
|
||||
| `zpaq` | Zpaq file |
|
||||
|
||||
See [list of archive formats](https://en.wikipedia.org/wiki/List_of_archive_formats) for
|
||||
more information regarding archive formats.
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
|
||||
_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|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)(-.)'" \
|
||||
"*::archive file:_files -g '(#i)*.(7z|Z|apk|aar|bz2|cab|cpio|deb|ear|gz|ipa|ipsw|jar|lrz|lz4|lzma|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)(-.)'" \
|
||||
&& return 0
|
||||
|
|
|
@ -73,6 +73,7 @@ EOF
|
|||
(*.zst) unzstd "$file" ;;
|
||||
(*.cab) cabextract -d "$extract_dir" "$file" ;;
|
||||
(*.cpio) cpio -idmvF "$file" ;;
|
||||
(*.zpaq) zpaq x "$file" ;;
|
||||
(*)
|
||||
echo "extract: '$file' cannot be extracted" >&2
|
||||
success=1 ;;
|
||||
|
|
Loading…
Reference in a new issue