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
4b5076b5
Unverified
Commit
4b5076b5
authored
Jan 16, 2023
by
xiagw
Committed by
GitHub
Jan 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(extract): add `pbzip2` and `pixz` (#11435)
parent
df658350
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
extract.plugin.zsh
plugins/extract/extract.plugin.zsh
+6
-3
No files found.
plugins/extract/extract.plugin.zsh
View file @
4b5076b5
...
...
@@ -30,12 +30,15 @@ EOF
local
extract_dir
=
"
${
1
:t:r
}
"
local
file
=
"
$1
"
full_path
=
"
${
1
:A
}
"
case
"
${
file
:l
}
"
in
(
*
.tar.gz|
*
.tgz
)
((
$+
commands[pigz]
))
&&
{
pigz
-dc
"
$file
"
|
tar
xv
}
||
tar
zxvf
"
$file
"
;;
(
*
.tar.bz2|
*
.tbz|
*
.tbz2
)
tar
xvjf
"
$file
"
;;
(
*
.tar.gz|
*
.tgz
)
((
$+
commands[pigz]
))
&&
{
tar
-I
pigz
-xvf
"
$file
"
}
||
tar
zxvf
"
$file
"
;;
(
*
.tar.bz2|
*
.tbz|
*
.tbz2
)
((
$+
commands[pbzip2]
))
&&
{
tar
-I
pbzip2
-xvf
"
$file
"
}
||
tar
xvjf
"
$file
"
;;
(
*
.tar.xz|
*
.txz
)
((
$+
commands[pixz]
))
&&
{
tar
-I
pixz
-xvf
"
$file
"
}
||
{
tar
--xz
--help
&> /dev/null
\
&&
tar
--xz
-xvf
"
$file
"
\
||
xzcat
"
$file
"
|
tar
xvf -
;;
||
xzcat
"
$file
"
|
tar
xvf -
}
;;
(
*
.tar.zma|
*
.tlz
)
tar
--lzma
--help
&> /dev/null
\
&&
tar
--lzma
-xvf
"
$file
"
\
...
...
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