From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3093 invoked from network); 23 Feb 2003 01:57:27 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 23 Feb 2003 01:57:27 -0000 Received: (qmail 11361 invoked by alias); 23 Feb 2003 01:57:06 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5937 Received: (qmail 11348 invoked from network); 23 Feb 2003 01:57:06 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 23 Feb 2003 01:57:06 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [4.64.233.231] by sunsite.dk (MessageWall 1.0.8) with SMTP; 23 Feb 2003 1:57:5 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id h1N1tuE11500; Sat, 22 Feb 2003 17:55:56 -0800 From: "Bart Schaefer" Message-Id: <1030223015556.ZM11499@candle.brasslantern.com> Date: Sun, 23 Feb 2003 01:55:55 +0000 In-Reply-To: <87lm073h95.fsf@cine.davh.dk> Comments: In reply to Dennis Haney "tar bzip" (Feb 23, 2:41am) References: <87lm073h95.fsf@cine.davh.dk> X-Mailer: Z-Mail (5.0.0 30July97) To: Dennis Haney , zsh-users@sunsite.dk Subject: Re: tar bzip MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Feb 23, 2:41am, Dennis Haney wrote: } } xvzf is in my fingers and I keep forgetting it every time I untar a } bzip file, so: } } How is it possible to get tar xvzf something.tbz (or } something.tar.bz2) to convert the z (in xvzf) to a j? Possibly this: function tar { integer i=1 while (( i < ARGC )) do if [[ $argv[i] == (x*v|v*x)*f && $argv[i] == *z* && $argv[i+1] == *.(t|)bz(|2) ]] argv[i]=${argv[i]:s/z/j} break fi done command tar $* } The problem of course is that something like xvzbf is followed first by a blocksize and then by a file name, so without creating a full-blown tar option parser you really can't do a perfect job.