Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
68c4c062
Commit
68c4c062
authored
Nov 19, 2019
by
Richard Pöttler
Committed by
Marc Cornellà
Nov 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extract: add RPM archive support (#8347)
Also more quiet extraction. -D for cpio was not used due to additional output.
parent
26df8a22
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
1 deletion
+3
-1
README.md
plugins/extract/README.md
+1
-0
_extract
plugins/extract/_extract
+1
-1
extract.plugin.zsh
plugins/extract/extract.plugin.zsh
+1
-0
No files found.
plugins/extract/README.md
View file @
68c4c062
...
...
@@ -27,6 +27,7 @@ plugins=(... extract)
|
`jar`
| Java Archive |
|
`lzma`
| LZMA archive |
|
`rar`
| WinRAR archive |
|
`rpm`
| RPM package |
|
`sublime-package`
| Sublime Text package |
|
`tar`
| Tarball |
|
`tar.bz2`
| Tarball with bzip2 compression |
...
...
plugins/extract/_extract
View file @
68c4c062
...
...
@@ -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|lzma|rar|sublime-package|tar|tar.bz2|tar.gz|tar.xz|tar.zma|tbz|tbz2|tgz|tlz|txz|war|whl|xpi|xz|zip)(-.)'" \
"*::archive file:_files -g '(#i)*.(7z|Z|apk|aar|bz2|deb|gz|ipsw|jar|lzma|rar|
rpm|
sublime-package|tar|tar.bz2|tar.gz|tar.xz|tar.zma|tbz|tbz2|tgz|tlz|txz|war|whl|xpi|xz|zip)(-.)'" \
&& return 0
plugins/extract/extract.plugin.zsh
View file @
68c4c062
...
...
@@ -48,6 +48,7 @@ extract() {
(
*
.z
)
uncompress
"
$1
"
;;
(
*
.zip|
*
.war|
*
.jar|
*
.sublime-package|
*
.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
"
;;
(
*
.deb
)
mkdir
-p
"
$extract_dir
/control"
...
...
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