Browse Source

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

david 1 year ago
parent
commit
9b91e82560
3 changed files with 3 additions and 1 deletions
  1. 1 0
      plugins/extract/README.md
  2. 1 1
      plugins/extract/_extract
  3. 1 0
      plugins/extract/extract.plugin.zsh

+ 1 - 0
plugins/extract/README.md

@@ -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.

+ 1 - 1
plugins/extract/_extract

@@ -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

+ 1 - 0
plugins/extract/extract.plugin.zsh

@@ -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 ;;