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

Re: Question about completion



Hi Goran,

>My second question is more complicated. In ClearCase, one can access
>different version of file with syntax like this : filename@@version,
>where version is /main/1 for example. So full path for a file may look
>like "foo@@/main/1". Right now, my completion lists only the filenames,
>that is, only "foo" is listed. Is there a way to program completion so
>that if a strng ends with "@@", I could run a custom function which would
>list all the versions available ? I have looked at the manual pages and
>examples, but I can't figure this out.

I use to work at a place that used Clearcase and had this same problem.  I
never did get it to work properly.  Even though, at one point I might have
reported I did, I think I was mistaken.  I believe the problem is in _files, I
believe that it is doing readdir() at the lowest level since it uses the shell
globbing code.

We talked a little about this in zsh-workers #9631 (and related messages). I
suspect the person to deal with this problem would be Sven when he comes back,
unless you are willing to dig into _files.  Sven did suggest some solutions at
that point.  Also, it sounds like Peter might soon have some interest in better
Clearcase support.

I've been working on using XML to generate Clearcase completion function based
on "cleartool help" output.  I'll post something within a week, showing what
I've got.  Mostly this can create the _arguments calls.  But it still would
require some one to write the listing functions, such as the ones you have
_cc_views _cc_files and _cc_co_files.

-FR.

__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/



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