Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
compctl question (zsh-2.6beta20)
- X-seq: zsh-users 255
- From: "Adam R. Paul" <adamp@xxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: compctl question (zsh-2.6beta20)
- Date: Thu, 20 Jun 1996 13:27:27 -0700 (PDT)
Hello,
I'm having a bit of trouble getting a compctl the way I want it for
cpio - what I have now is:
compctl -x 'p[1,1]' -k '(-iamcd -iamcdt -iamcdv -moldc -moldcv -dump )' - \
'C[-1,(-iamcd|-iamcdt|-iamcdv)]' -g '*(-/)' + -g '*.cpio' -P '-I ' - \
'c[-1,-dump]' -g '*(-/)' - 'W[1,(-moldc|-moldcv)]' -g '*(-/) -P '-O ' \
-- cpio gcpio
which almost does what I want it to. The problem is that if I type, eg:
cpio -m<tab> ~/al<tab>/sr<tab>/<tab>
it expands to:
cpio -moldc -O -O -O ~/alad/src/sys/
ie. it is prepending an '-O' for _each_ pathname completion, which is not at
all what I want. I can see why this is the case, but can't figure out how to
prepend exactly one '-O' to the pathnames if the 1st argument is -moldc (also,
why does this _not_ happen with completions on '-iamcd' ? Is it because
the -P binds to the *.cpio rule, not the entire completion?). Could I instead
have the '-O' postpended to the '-moldc' completion?
Any suggestions?
BTW, this is zsh 2.6beta20 on SCO OpenServer 5 if it matters (it shouldn't).
Blessed be,
_Adam
-----
Adam Paul - adamp@xxxxxxx (work), apaul@xxxxxxx (home)
SCO Engineering Any opinions expressed here are necessarily not SCO's
"Be beautiful and I will love you," she said.
"Love me and I will be beautiful," he said.
They argued for days...
- Somerset Winterbutton
Messages sorted by:
Reverse Date,
Date,
Thread,
Author