Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
322e592c
Unverified
Commit
322e592c
authored
Jul 18, 2020
by
Thi Doãn
Committed by
GitHub
Jul 18, 2020
Browse files
extract: add IPA to extractable filetypes (#9117)
Co-authored-by:
Marc Cornellà
<
marc.cornella@live.com
>
parent
c99f3c50
Changes
3
Hide whitespace changes
Inline
Side-by-side
plugins/extract/README.md
View file @
322e592c
...
...
@@ -23,6 +23,7 @@ plugins=(... extract)
|
`bz2`
| Bzip2 file |
|
`deb`
| Debian package |
|
`gz`
| Gzip file |
|
`ipa`
| iOS app package |
|
`ipsw`
| iOS firmware file |
|
`jar`
| Java Archive |
|
`lrz`
| LRZ archive |
...
...
plugins/extract/_extract
View file @
322e592c
...
...
@@ -3,5 +3,5 @@
_arguments \
'(-r --remove)'{-r,--remove}'[Remove archive.]' \
"*::archive file:_files -g '(#i)*.(7z|Z|apk|aar|bz2|deb|gz|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|deb|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
plugins/extract/extract.plugin.zsh
View file @
322e592c
...
...
@@ -55,7 +55,7 @@ extract() {
(
*
.lz4
)
lz4
-d
"
$1
"
;;
(
*
.lzma
)
unlzma
"
$1
"
;;
(
*
.z
)
uncompress
"
$1
"
;;
(
*
.zip|
*
.war|
*
.jar|
*
.sublime-package|
*
.ipsw|
*
.xpi|
*
.apk|
*
.aar|
*
.whl
)
unzip
"
$1
"
-d
$extract_dir
;;
(
*
.zip|
*
.war|
*
.jar|
*
.sublime-package|
*
.
ipa|
*
.
ipsw|
*
.xpi|
*
.apk|
*
.aar|
*
.whl
)
unzip
"
$1
"
-d
$extract_dir
;;
(
*
.rar
)
unrar x
-ad
"
$1
"
;;
(
*
.rpm
)
mkdir
"
$extract_dir
"
&&
cd
"
$extract_dir
"
&&
rpm2cpio
"../
$1
"
| cpio
--quiet
-id
&&
cd
..
;;
(
*
.7z
)
7za x
"
$1
"
;;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment