From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22120 invoked from network); 2 Mar 1998 08:52:39 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 2 Mar 1998 08:52:39 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id DAA20066; Mon, 2 Mar 1998 03:40:05 -0500 (EST) Resent-Date: Mon, 2 Mar 1998 03:39:49 -0500 (EST) To: zsh-users@math.gatech.edu Path: mason From: mason@primenet.com.au (Geoff Wing) Newsgroups: lists.zsh.users Subject: Re: completion and history Date: 2 Mar 1998 08:42:05 GMT Organization: A poorly-installed InterNetNews site Message-ID: References: <19980301211209.42475@flashback.net> Reply-To: mason@primenet.com.au NNTP-Posting-Host: coral.primenet.com.au Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: coral.primenet.com.au 888828125 21961 (None) 203.24.36.33 X-Complaints-To: usenet@coral.primenet.com.au X-Newsreader: slrn (0.9.4.6 UNIX) Resent-Message-ID: <"fZrBv1.0.-u4.L1d-q"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1357 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Jimmy Mäkelä typed: :I have got this compctl to unzip files into a directory based on their name, :but i would like to know of a cleaner way to do this, especially the :function. How would i for example do if i wanted to be able to add a -dNAME :for each of the arguments before the current on the commandline like: :unzip 1.zip 2.zip 3.zip gives: :unzip 1.zip 2.zip 3.zip -d1 -d2 -d3 Umm, you've got a funny version of unzip if you can specify more than one archive. Can it? Also, your compzip function doesn't need to run any other commands: compzip() { local a b read -c a b=(${=a}) reply=("-d${b[2]:r}") } :--------CUT----------- :compctl -x 'p[1]' -g '*.(zip|ZIP)' - 'p[2]' -K compzip -- unzip : :From the compzip function: :read -c z :z=`echo $z|awk '{print $2}'|awk -F . '{print $1}'` :reply=("-d$z") :return :---------------------- : :And how do i get the appendhistory thing to work, what have i done wrong: :% grep HIST .zshrc :HISTSIZE=200 :HISTFILE=.zshistory HISTFILE=~/.zshistory -- Geoff Wing Mobile : 0412 162 441 Work URL: http://www.primenet.com.au/ Ego URL: http://pobox.com/~gcw/