zsh-users
 help / color / mirror / code / Atom feed
* Clearcase completions
@ 1999-09-11 21:16 Nosherwan Minwalla
  1999-09-12 17:51 ` David Kågedal
  1999-09-13  6:51 ` Paul Lew
  0 siblings, 2 replies; 3+ messages in thread
From: Nosherwan Minwalla @ 1999-09-11 21:16 UTC (permalink / raw)
  To: Z Shell Users List

Hello,

	Does anyone have a set of completions pre-written for the Rational
Clearcase UNIX command line tool (cleartool)? If not, does anyone have
similar completions for other versioning packages (RCS/CVS etc.) that I
could base completions for this product on? I'm new to zsh-completions and
greatly appreciate any help in this regard.

Nosherwan Minwalla
(Nosherwan.Minwalla@ap.bdi.gte.com)



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Clearcase completions
  1999-09-11 21:16 Clearcase completions Nosherwan Minwalla
@ 1999-09-12 17:51 ` David Kågedal
  1999-09-13  6:51 ` Paul Lew
  1 sibling, 0 replies; 3+ messages in thread
From: David Kågedal @ 1999-09-12 17:51 UTC (permalink / raw)
  To: zsh-users

Nosherwan Minwalla <nnminwal@CC.OWU.EDU> writes:

> 	Does anyone have a set of completions pre-written for the Rational
> Clearcase UNIX command line tool (cleartool)? If not, does anyone have
> similar completions for other versioning packages (RCS/CVS etc.) that I
> could base completions for this product on? I'm new to zsh-completions and
> greatly appreciate any help in this regard.

I did the simplest thing, and made it complete the clearcase
sub-commands.  Much more could be done, but this is still very
useful.

ctcommands=( help man apropos quit cd pwd shell mkview rmview lsview \
	     startview endview setview edcs catcs setcs pwv lsprivate \
	     recoverview reformatview getcache setcache checkvob mkvob \
	     rmvob lsvob reformatvob relocate mount umount space getlog \
	     lsclients hostinfo complete_migration protect protectvob lock \
	     unlocak lslock mkeltype mkbrtype mklbtype mkattype mkhltype \
	     mktrtype lstype rmtype chtype cptype mkpool lspool rmpool chpool \
	     lsreplica rename ln rmname move mkdir mkelem rmelem mkbranch \
	     rmbranch rmver checkout uncheckout checkin reserve unreserve \
	     lscheckout chevent mklabel rmlabel mkattr rmattr mkhlink rmhlink \
	     mktrigger rmtrigger diff merge rmmerge findmerge find ls \
	     describe lshistory lsvtree annotate lsdo rmdo catcr diffcr \
	     winkin mktag rmtag register unregister mkregion rmregion
	     lsregion )
compctl -k ctcommands -x 'p[2,-1]' -f -- cleartool

-- 
David Kågedal


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Clearcase completions
  1999-09-11 21:16 Clearcase completions Nosherwan Minwalla
  1999-09-12 17:51 ` David Kågedal
@ 1999-09-13  6:51 ` Paul Lew
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Lew @ 1999-09-13  6:51 UTC (permalink / raw)
  To: Nosherwan Minwalla; +Cc: Z Shell Users List

>>>>> "Nosherwan" == Nosherwan Minwalla <nnminwal@CC.OWU.EDU> writes:

    Nosherwan> Does anyone have a set of completions pre-written for
    Nosherwan> the Rational Clearcase UNIX command line tool
    Nosherwan> (cleartool)?

Attached is the clearcase completion I grabbed from the net (dont
remember where) and updated for the latest clearcase_p3.2-37, please
email update if you make any enhancement.

					-- Paul  09/12/99  11:40 PM --
#
# Clearcase Completion!!!
# Last update:  07/21/99  08:44 PM  (Edition: 3)
#
# arrays
ctcmds=(annotate apropos catcr catcs cd checkin checkout checkvob chevent \
	chpool chtype complete_migration cptype describe diff diffcr edcs \
	endview find findmerge getcache getlog help hostinfo ln lock ls \
	lscheckout lsclients lsdo lshistory lslock lspool lsprivate lsregion \
	lsreplica lstype lsview lsvob lsvtree man merge mkattr mkattype \
	mkbranch mkbrtype mkdir mkelem mkeltype mkhlink mkhltype mklabel \
	mklbtype mkpool mkregion mktag mktrigger mktrtype mkview mkvob mount \
	mv protect protectvob pwd pwv quit recoverview reformatview \
	reformatvob register relocate rename reserve rmattr rmbranch rmdo \
	rmelem rmhlink rmlabel rmmerge rmname rmpool rmregion rmtag rmtrigger \
	rmtype rmver rmview rmvob setcache setcs setview shell space \
	startview umount uncheckout unlock unregister unreserve winkin)

# functions
function listlabels { reply=(`cleartool lstype -lbtype -short`); }
function listview { reply=(`cleartool lsview -short`); }
function listview2 { reply=(`cleartool lsview | awk '{print $NF}'`); }
function listvobs { reply=(`cleartool lsvob -short`); }
function listco { reply=(`cleartool lsco -short`); }
#function listco {
# reply=(`( cd $(dirname ${1:-.}); ls -d *(/ND); cleartool lsco -short)`);
#}
function listcs { reply=(`ls ~basic/ClearCase/cs*`); }

# 'W[1,ci|checkin|unco|uncheckout]' -K listco -

compctl -f -x \
'p[1]' -k ctcmds - \
'W[1,ci|checkin] S[-]' -k "(-c -nc -cfile -cq -cqe -nwarn -cr -ptime \
			    -keep -rm -from -identical -cwork)" - \
'W[1,mkdir] S[-]' -k "(-c -nc -cfile -cq -cqe )" - \
'W[1,mkbrtype|mklbtype] S[-]' -k "(-replace -global -ordinary -pbranch \
				   -shared -c -cfile -cq -cqe -nc)" - \
'W[1,co|checkout] S[-]' -k "(-c -nc -reserved -unreserved -out -ndate \
			     -branch -version -nwarn -cfile -cq -cqe -nc)" - \
'W[1,unco|uncheckout] S[-]' -k "(-rm -keep -cwork)" - \
'w[1,catcr] S[-]' -k "(-flat -recurse -short -long -union -makefile \
		       -select -ci -type -element_only -view_only \
		       -ciritcal_only -name -zero -nxname)" - \
'w[1,catcs] S[-]' -k "(-tag)" - \
'w[1,chevent] S[-]' -k "(-c -cq -cfile -cqe -nc -append -insert -replace \
			 -event -invob -pname)" - \
'w[1,diff] S[-]' -k "(-graphical -hstack -vstack -tiny -window -predecessor \
		      -serial_format -options -diff_format -columns)" - \
'w[1,find] S[-]' -k "(-all -visible -nvisible -avobs -name -depth \
		      -recurse -directory -cview -user -group -type \
		      -follow -nxname -element -branch -version \
		      -print -exec -ok)" - \
'w[1,ln] S[-]' -k "(-c -nc -slink -cq -cqe -nc -nco -force)" - \
'w[1,ls] S[-]' -k "(-recurse -directory -short -long -vob_only -view_only \
		    -nxname -visible)" - \
'w[1,lsprivate] S[-]' -k "(-tag -invob -long -short -co -do -other)" - \
'W[1,lsco|lscheckout] S[-]' -k "(-short -long -fmt -cview -brtype -me -user \
				 -recurse -directory -all -avobs \
				 -areplicas)" - \
'w[1,lshistory] S[-]' -k "(-graphical -nopreferences -minor -short -long \
			   -fmt -minor -nco -since -user \
			   -branch -eventid -recurse -directory -all \
			   -avobs)" - \
'W[1,lsview|lsvob] S[-]' -k "(-short -long -host -region -storage -uuid)" - \
'w[1,lsvtree] S[-]' -k "(-graphical -nrecurse -short -branch -nmerge -all \
			 -nco -options)" - \
'w[1,lstype] S[-]' -k "(-eltype -brtype -lbtype -trtype -short -long)" - \
'w[1,man]' -k ctcmds - \
'w[1,mkelem] S[-]' -k "(-c -nc -ci -cqe -cfile -master -nwarn -ptime -nco \
			-eltype)" - \
'w[1,mklabel] S[-]' -k "(-c -nc -cq -cqe -cfile -replace -recurse -config \
			 -version -select -ci -type -name -config)" - \
'w[1,mklabel] p[2]' -X "There are %n labels:" -K listlabels - \
'W[1,mount|umount]' -K listvobs - \
'w[1,protect] S[-]' -k "(-chown -chgrp -chmod -recurse -c -nc -cq -cqe -file \
			 -directory -pname)" - \
'w[1,setview]' -K listview - \
'w[1,rmview]' -K listview2 - \
'w[1,setcs] S[-]' -k "(-current -default -tag)" - \
'w[1,setcs]' -K listcs - \
'c[-1,-user]' -u - \
'c[-1,-chown]' -u - \
'c[-1,-tag]' -K listview - \
-- cleartool ct


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-09-13  6:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-11 21:16 Clearcase completions Nosherwan Minwalla
1999-09-12 17:51 ` David Kågedal
1999-09-13  6:51 ` Paul Lew

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).