Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

completion and history



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



Messages sorted by: Reverse Date, Date, Thread, Author