Zsh Mailing List Archive
Messages sorted by:
Re: Question about Completion
- X-seq: zsh-users 4371
- From: Felix Rosencrantz <f_rosencrantz@xxxxxxxxx>
- To: zsh-users <zsh-users@xxxxxxxxxxxxxx>
- Subject: Re: Question about Completion
- Date: Thu, 11 Oct 2001 23:55:01 -0700 (PDT)
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
I received some private replies from Goran and Sven about Clearcase filename
completion back in Sept that I thought I would forward in part to the list. (I
figure there might be a few lurkers who have some interest.)
On Sep 23 23:54:17 2001, Goran Koruga wrote:
>Someone else has told me to use setopt automenu and setopt autolist.
>This works if I don't have my custom completion module - so later on I
>asked if there's a way to get that working.
Check Sven's reply below...
>Right now I am still banging my head with the first problem - it will
>call _cc_files and _cc_co_files even when just arguments are to be
>completed. I have realized that _arguments has -A switch, but that will
>mean I have to change all calls to _arguments to add -A "-*" (I have
>actually found that in one of the man pages ;). I have checked _cvs
>script and it seems quite similar to mine, however for them the file
>completing functions are not called.
Not sure. It might be useful to look at the trace output to see what is
happening. If you use the default bindings, there is a nice completion trace
facility via "^X-?".
>All of this completion stuff is quite complex. Right now I will try to
>compare CVS completion against mine to try and figure out the difference.
One problem I noticed with your completion function is that you use the "-s"
flag with _arguments. This is used if you have single letter options that can
be combined into a single word (e.g. the ls command allows "ls -la").
Clearcase has word options, not letter options, so doesn't need this flag like
In response to a message where I mention some comments Sven had made some time
back in zsh-workers #9631. He makes a another possible to _path_files. (I
don't have access to clearcase, so I can't test this...)
On Tue Sep 25 05:33:12 2001, Sven Wischnowsky responded.
>From Sven Wischnowsky Tue Sep 25 05:33:12 2001
>I don't remember what I suggested back then and don't have the time to
>look it up now. But anyway, Goran and others using ClearCase who want
>to help could try the following: make themselves a copy of _path_files
>and insert before line 36 something like:
> if compset -P '*@@'; then
> # code to complete the version string here...
>Instead of that `fi' one could try:
> elif (( ! $pfxsfx[(I)-[a-zA-Z12]S] )); then
> pfxsfx=( "$pfxsfx[@]" -qS '@@' )
>To make it always add an automatically removable `@@' suffix if there
>isn't one from the calling function.
>Then if we arrive at something usable, we can start thinking about how
>to integrate that into the distribution, maybe with one or more styles
>or by adding generic code into _path_files so that can make it call
>arbitrary helper functions (with one for ClearCase being the first
>implemented) or whatever.
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
Messages sorted by: