zsh-users
 help / color / mirror / code / Atom feed
* completion and history
@ 1998-03-01 20:12 Jimmy Mäkelä
  1998-03-02  6:53 ` Mircea Damian
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jimmy Mäkelä @ 1998-03-01 20:12 UTC (permalink / raw)
  To: zsh-users

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 <TAB> gives:
unzip 1.zip 2.zip 3.zip -d1 -d2 -d3

--------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

% ls -o .zshistory
-rw-------   1 jmy             0 Feb 23 20:16 .zshistory

% grep setopt .zshrc|grep hist
setopt   correctall autocd longlistjobs nobeep automenu appendhistory
setopt   autoresume histignoredups pushdsilent noclobber


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1998-03-03 16:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-01 20:12 completion and history Jimmy Mäkelä
1998-03-02  6:53 ` Mircea Damian
1998-03-02  8:26   ` Geoff Wing
1998-03-03 16:32   ` history file reset to 0 Vincent Lefevre
1998-03-02  8:42 ` completion and history Geoff Wing
1998-03-02 15:57   ` Jimmy Mäkelä
1998-03-02  8:56 ` Peter Stephenson
1998-03-02  9:54   ` Mircea Damian

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).