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

Re: completing a single clearcase command



On Feb 7,  1:32pm, Eric.D.Friedman@xxxxxxxxxxxxxx wrote:
}
} Like CVS, clearcase has a 2-level command system.  The first command is
} always "cleartool" (usually aliased to "ct").  The second is the real
} operation you want to do.  So, for example, "ct ls" does a cleartool
} equivalent of ls.

The most thorough examples of completion for this sort of command are
Completion/Unix/Command/_cvs and Completion/Debian/Command/_apt.  The
former uses _arguments to parse the command line, and the latter uses
_regex_arguments which allows more detailed pattern-matching but has a
somewhat more tangled syntax.

Which one is better depends on how complex the stuff between "ct" and
the operation name may be.  If there are never any arguments to "ct"
before the operation name, look at Completion/Debian/Command/_bts.

A less intense _regex_arguments example is Completion/X/Command/_xset.


-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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