mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
feat(extract): add cpio support
This commit is contained in:
parent
59a9b453d3
commit
0b506fea0c
3 changed files with 3 additions and 1 deletions
|
@ -22,6 +22,7 @@ plugins=(... extract)
|
|||
| `aar` | Android library file |
|
||||
| `bz2` | Bzip2 file |
|
||||
| `cab` | Microsoft cabinet archive |
|
||||
| `cpio` | Cpio archive |
|
||||
| `deb` | Debian package |
|
||||
| `ear` | Enterprise Application aRchive |
|
||||
| `gz` | Gzip file |
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
|
||||
_arguments \
|
||||
'(-r --remove)'{-r,--remove}'[Remove archive.]' \
|
||||
"*::archive file:_files -g '(#i)*.(7z|Z|apk|aar|bz2|cab|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)(-.)'" \
|
||||
&& return 0
|
||||
|
|
|
@ -70,6 +70,7 @@ extract() {
|
|||
;;
|
||||
(*.zst) unzstd "$1" ;;
|
||||
(*.cab) cabextract -d "$extract_dir" "$1" ;;
|
||||
(*.cpio) cpio -idmvF "$1" ;;
|
||||
(*)
|
||||
echo "extract: '$1' cannot be extracted" >&2
|
||||
success=1
|
||||
|
|
Loading…
Reference in a new issue