Better k decompression
This commit is contained in:
parent
b52e7740c8
commit
9d3ea0cece
27
shells/zshrc
27
shells/zshrc
@ -228,18 +228,21 @@ function k(){
|
|||||||
elif [ -f "$@" ] ; then
|
elif [ -f "$@" ] ; then
|
||||||
#Extract if it's extractable
|
#Extract if it's extractable
|
||||||
case $1 in
|
case $1 in
|
||||||
*.tar.xz) pv $1|tar xJf -;;
|
*.tar.xz) pv $1|tar -xJf - ;;
|
||||||
*.tar.bz2) pv $1|tar xjf -;;
|
*.tar.bz2) pv $1|tar -xjf - ;;
|
||||||
*.tar.gz) pv $1|tar xzf -;;
|
*.tar.gz) pv $1|tar -xzf - ;;
|
||||||
*.tar) pv $1|tar xf -;;
|
*.tar) pv $1|tar -xf - ;;
|
||||||
*.tbz2) pv $1|tar xjf -;;
|
*.tbz2) pv $1|tar -xjf - ;;
|
||||||
*.tgz) pv $1|tar xzf -;;
|
*.tgz) pv $1|tar -xzf - ;;
|
||||||
*.bz2) bunzip2 $1 ;;
|
*.lzma) pv $1|tar --lzma -xf - ;;
|
||||||
*.rar) rar x $1 ;;
|
*.xz) pv $1|tar -xJf - ;;
|
||||||
*.gz) gunzip $1 ;;
|
*.bz2) bunzip2 $1 ;;
|
||||||
*.zip) unzip $1 ;;
|
*.rar) rar x $1 ;;
|
||||||
*.Z) uncompress $1 ;;
|
*.gz) gunzip $1 ;;
|
||||||
*.7z) 7z x $1 ;;
|
*.zip) unzip $1 ;;
|
||||||
|
*.Z) uncompress $1 ;;
|
||||||
|
*.7z) 7z x $1 ;;
|
||||||
|
*.lrz) lrzuntar $1 ;;
|
||||||
*) vim $1
|
*) vim $1
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user