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