9b91e8256011240cbf65ba65fbe55c5fd9dbae07

Author
david <chxei5667@gmail.com>
Committer
GitHub <noreply@github.com>
Date

Message

feat(extract): add `zpaq` support (#11478)

Diff

This diff is truncated to protect this page.

 1diff --git a/plugins/extract/README.md b/plugins/extract/README.md
 2index 44f0b05a1c35095da23b5d11e191b8c6c79f87b7..f67b53618a352b95adb2a1794c5b729f99225fb2 100644
 3--- a/plugins/extract/README.md
 4+++ b/plugins/extract/README.md
 5@@ -55,6 +55,7 @@ plugins=(... extract)
 6 | `xz`              | LZMA2 archive                        |
 7 | `zip`             | Zip archive                          |
 8 | `zst`             | Zstandard file (zstd)                |
 9+| `zpaq`            | Zpaq file                            |
10 
11 See [list of archive formats](https://en.wikipedia.org/wiki/List_of_archive_formats) for
12 more information regarding archive formats.
13diff --git a/plugins/extract/_extract b/plugins/extract/_extract
14index 27b099c9e4efe741010947a887568d9733b0e8d6..64678fedeaab15d9ae757fa553dff30e833d4353 100644
15--- a/plugins/extract/_extract
16+++ b/plugins/extract/_extract
17@@ -3,5 +3,5 @@
18 
19 _arguments \
20   '(-r --remove)'{-r,--remove}'[Remove archive.]' \
21-  "*::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)(-.)'" \
22diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh
23index 563d88c72ff0d2c8cbd9c65fd90bce6ef156345c..4c84ef88395a1b2c74b282bebe037c4cfb545221 100644
24--- a/plugins/extract/extract.plugin.zsh
25+++ b/plugins/extract/extract.plugin.zsh
26@@ -73,6 +73,7 @@ EOF
27       (*.zst) unzstd "$file" ;;
28       (*.cab) cabextract -d "$extract_dir" "$file" ;;
29       (*.cpio) cpio -idmvF "$file" ;;
30+      (*.zpaq) zpaq x "$file" ;;
31       (*)
32         echo "extract: '$file' cannot be extracted" >&2
33         success=1 ;;