From a9410fab95292c8698b7e5e7a1f9268cb8e590e0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 21 Oct 2009 12:04:23 +0200 Subject: extract: Allow partial extraction of tar archives --- etc/functions/extract | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'etc/functions/extract') diff --git a/etc/functions/extract b/etc/functions/extract index ac98916..f2eeb27 100644 --- a/etc/functions/extract +++ b/etc/functions/extract @@ -9,8 +9,8 @@ function confirm_shar { if [[ -f $1 ]] { case $1 in - *.(tar.bz2|bz2)) tar xvjf $1 ;; - *.(tar.gz|tgz)) tar xvzf $1 ;; + *.(tar.bz2|bz2)) tar xvjf $* ;; + *.(tar.gz|tgz)) tar xvzf $* ;; *.tar.lzma) unlzma $1 | tar xv ;; *.ace) unace e $1 ;; *.rar) unrar x $1 ;; @@ -18,7 +18,7 @@ if [[ -f $1 ]] { *.bz2) bzip2 -d $1 ;; *.lzh) lha x $1 ;; *.gz) gunzip -d $1 ;; - *.tar) tar xvf $1 ;; + *.tar) tar xvf $* ;; *.zip) unzip $1 ;; *.Z) uncompress $1 ;; *.shar) confirm_shar && sh $1 ;; -- cgit v1.2.3