Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
6bac9eb1
Commit
6bac9eb1
authored
Dec 29, 2019
by
Marc Cornellà
Committed by
Robby Russell
Dec 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extract: add lrz support (#8500)
parent
b0be0439
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
1 deletion
+5
-1
README.md
plugins/extract/README.md
+2
-0
_extract
plugins/extract/_extract
+1
-1
extract.plugin.zsh
plugins/extract/extract.plugin.zsh
+2
-0
No files found.
plugins/extract/README.md
View file @
6bac9eb1
...
...
@@ -25,6 +25,7 @@ plugins=(... extract)
|
`gz`
| Gzip file |
|
`ipsw`
| iOS firmware file |
|
`jar`
| Java Archive |
|
`lrz`
| LRZ archive |
|
`lzma`
| LZMA archive |
|
`rar`
| WinRAR archive |
|
`rpm`
| RPM package |
...
...
@@ -32,6 +33,7 @@ plugins=(... extract)
|
`tar`
| Tarball |
|
`tar.bz2`
| Tarball with bzip2 compression |
|
`tar.gz`
| Tarball with gzip compression |
|
`tar.lrz`
| Tarball with lrzip compression |
|
`tar.lz`
| Tarball with lzip compression |
|
`tar.xz`
| Tarball with lzma2 compression |
|
`tar.zma`
| Tarball with lzma compression |
...
...
plugins/extract/_extract
View file @
6bac9eb1
...
...
@@ -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|l
zma|rar|rpm|sublime-package|tar|tar.bz2|tar.g
z|tar.lz|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|ipsw|jar|l
rz|lzma|rar|rpm|sublime-package|tar|tar.bz2|tar.gz|tar.lr
z|tar.lz|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 @
6bac9eb1
...
...
@@ -46,9 +46,11 @@ extract() {
||
zstdcat
"
$1
"
|
tar
xvf -
;;
(
*
.tar
)
tar
xvf
"
$1
"
;;
(
*
.tar.lz
)
((
$+
commands[lzip]
))
&&
tar
xvf
"
$1
"
;;
(
*
.tar.lrz
)
((
$+
commands[lrzuntar]
))
&&
lrzuntar
"
$1
"
;;
(
*
.gz
)
((
$+
commands[pigz]
))
&&
pigz
-dk
"
$1
"
||
gunzip
-k
"
$1
"
;;
(
*
.bz2
)
bunzip2
"
$1
"
;;
(
*
.xz
)
unxz
"
$1
"
;;
(
*
.lrz
)
((
$+
commands[lrunzip]
))
&&
lrunzip
"
$1
"
;;
(
*
.lzma
)
unlzma
"
$1
"
;;
(
*
.z
)
uncompress
"
$1
"
;;
(
*
.zip|
*
.war|
*
.jar|
*
.sublime-package|
*
.ipsw|
*
.xpi|
*
.apk|
*
.aar|
*
.whl
)
unzip
"
$1
"
-d
$extract_dir
;;
...
...
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