mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
parent
76d3eedf7f
commit
91b771914b
1 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ extract() {
|
||||||
|
|
||||||
success=0
|
success=0
|
||||||
extract_dir="${1:t:r}"
|
extract_dir="${1:t:r}"
|
||||||
case "$1" in
|
case "${1:l}" in
|
||||||
(*.tar.gz|*.tgz) (( $+commands[pigz] )) && { pigz -dc "$1" | tar xv } || tar zxvf "$1" ;;
|
(*.tar.gz|*.tgz) (( $+commands[pigz] )) && { pigz -dc "$1" | tar xv } || tar zxvf "$1" ;;
|
||||||
(*.tar.bz2|*.tbz|*.tbz2) tar xvjf "$1" ;;
|
(*.tar.bz2|*.tbz|*.tbz2) tar xvjf "$1" ;;
|
||||||
(*.tar.xz|*.txz)
|
(*.tar.xz|*.txz)
|
||||||
|
@ -45,7 +45,7 @@ extract() {
|
||||||
(*.bz2) bunzip2 "$1" ;;
|
(*.bz2) bunzip2 "$1" ;;
|
||||||
(*.xz) unxz "$1" ;;
|
(*.xz) unxz "$1" ;;
|
||||||
(*.lzma) unlzma "$1" ;;
|
(*.lzma) unlzma "$1" ;;
|
||||||
(*.Z) uncompress "$1" ;;
|
(*.z) uncompress "$1" ;;
|
||||||
(*.zip|*.war|*.jar|*.sublime-package|*.ipsw|*.xpi|*.apk) unzip "$1" -d $extract_dir ;;
|
(*.zip|*.war|*.jar|*.sublime-package|*.ipsw|*.xpi|*.apk) unzip "$1" -d $extract_dir ;;
|
||||||
(*.rar) unrar x -ad "$1" ;;
|
(*.rar) unrar x -ad "$1" ;;
|
||||||
(*.7z) 7za x "$1" ;;
|
(*.7z) 7za x "$1" ;;
|
||||||
|
|
Loading…
Reference in a new issue