From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16567 invoked from network); 28 Mar 2002 20:45:17 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 28 Mar 2002 20:45:17 -0000 Received: (qmail 27085 invoked by alias); 28 Mar 2002 20:44:59 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4794 Received: (qmail 27074 invoked from network); 28 Mar 2002 20:44:58 -0000 From: "Will Sargent" To: Subject: zsh completion for ATG dynamo Date: Thu, 28 Mar 2002 12:43:55 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0000_01C1D656.3921EA20" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 This is a multi-part message in MIME format. ------=_NextPart_000_0000_01C1D656.3921EA20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi again; I raided the _java completion script to get the information about the completion options for startDynamo, stopDynamo, checkDynamo and a bunch of other completion options. I'm posting them here in case someone else finds them useful. Note that I had some problems trying to expand out the servers options. I could not get _servers to autoload for some reason, so I just stuck it in the _startDynamo script itself. Please e-mail me with an improvements you make to these scripts. I only have a vague idea of all the possible complexities (notably I'm weak in compset), so any help is appreciated. Will. ------=_NextPart_000_0000_01C1D656.3921EA20 Content-Type: application/octet-stream; name="_startDynamo" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="_startDynamo" #compdef startDynamo stopDynamo startSQLRepository checkDynamo runDarina=0A= =0A= # startDynamo completion script.=0A= # This is mostly borrowed from the _java script, but I've edited=0A= # what I need to get modules and servers to work.=0A= =0A= # Copyright (C) 2002 Will Sargent =0A= =0A= # For some wierd reason, we need to load up _servers =0A= # manually. I think this may be my screw up.=0A= =0A= autoload -U _servers=0A= =0A= # We also need $DYNAMO_HOME defined because we use it to determine=0A= # modules.=0A= if [ -r bin/startDynamo ] ; then=0A= DYNAMO_HOME=3D`pwd`=0A= elif [ "$DYNAMO_HOME" =3D "" ] ; then=0A= echo 'Please set the DYNAMO_HOME environment variable.' =0A= exit 1=0A= else=0A= if [ ! -r ${DYNAMO_HOME}/bin/startDynamo ] ; then=0A= echo Unable to find ${DYNAMO_HOME}/bin/startDynamo - invalid setting = of DYNAMO_HOME=0A= exit 1=0A= fi=0A= fi=0A= =0A= # Define some local variables copied from _java here...=0A= local expl tmp match basedir=0A= local curcontext=3D"$curcontext" state line=0A= =0A= typeset -A opt_args tmpassoc=0A= =0A= case "$service" in=0A= startDynamo)=0A= _arguments \=0A= '-m[run additionally with the specified modules]:modules:->modules' \=0A= '-w[run ATG Dynamo Control Center and ATG Dynamo Application Server = in one VM]' \=0A= '-n[disable ATG Dynamo Control Center access]' \=0A= '-v[print version info and exit]' \=0A= '-i[print IP addresses of this machine and exit]' \=0A= '-b[run the base configuration - do not include installed apps]' \=0A= '*:server:_servers' \=0A= && return 0=0A= ;;=0A= =0A= stopDynamo)=0A= _arguments \=0A= '-user[the admin user name]' \=0A= '-password[the password]' \=0A= '-configPath[the configuration path]' \=0A= '-restart[restart the server]' \=0A= '-stopsessions[stop the sessions]' \=0A= '*:server:_servers' \=0A= && return 0=0A= ;;=0A= =0A= checkDynamo)=0A= _arguments \=0A= '-url[URL to check if the server is still running]' \=0A= '-email[Send email notification if URL check fails]' \=0A= '-restart[Restart the server if URL check fails]' \=0A= '-user[Name of administrator]' \=0A= '-password[Administrator password]' \=0A= '-verbose[Output additional information during this command]' \=0A= '*:server:_servers' \=0A= && return 0=0A= ;;=0A= =0A= runDarina)=0A= _arguments \=0A= '-dar-version' \=0A= '-q[Be quieter (fewer status messages)]' \=0A= '-Q[Be very quiet (only error messages)]' \=0A= '-separate-ejb-class-loaders[Do not allow EJB modules to share = classes]' \=0A= '-overwrite-dar[Overwrite existing DAR file (now the default).]' \=0A= '-regen[Regenerate impl and stub RMI files.]' \=0A= '-rmi[Uses "regular" rmi (JRMP) as the ejb protocol.]' \=0A= '-no-java-src[Do not include any .java files in the final DAR.]' \=0A= '-no-dar[Do not generate a dar file (still validates and generates = EJB client jars.)]' \=0A= '-iiop[Uses RMI-IIOP as the ejb protocol.]' \=0A= '-debug[Print out debugging information.]' \=0A= '-build[Compile source files.]' \=0A= '-buildall[Re-compile all source files.]' \=0A= '-compiler[Specify the default javac compiler command.]' \=0A= '-usage[Shows usage flags for runDarina]' \=0A= '-merge-ejbc-class-loaders[Allow EJB modules to share all classes.]' = \=0A= '-server[Loads the dynamo environment for the specified = server]:server:_servers' \=0A= && return 0=0A= ;;=0A= =0A= startSQLRepository)=0A= _arguments \=0A= '-m[list of module names separated by ;]:modules:->modules' \=0A= '-s[server name]' \=0A= '-repository[nucleus path to the repository]' \=0A= '-outputSQL' \=0A= '-outputSQLFile' \=0A= '-verboseSQL' \=0A= '-debug' \=0A= '-database' \=0A= '-export' \=0A= '-exportRepositories' \=0A= '-database' \=0A= '-encoding' \=0A= '-import' \=0A= '-noTransaction' \=0A= '*:server:_servers' \=0A= && return 0=0A= ;;=0A= esac=0A= =0A= # Start a new case statement. =0A= [[ -n "$state" ]] &&=0A= case "$state" in=0A= debug)=0A= if [[ -prefix :*, ]]; then=0A= compset -P :=0A= _values -s , lines vars source=0A= else=0A= compadd -P: none=0A= compadd -P: -qS, lines vars source=0A= fi=0A= ;;=0A= =0A= modules)=0A= cd $DYNAMO_HOME/..=0A= match=3D()=0A= compset -P '(#b)(*.)'=0A= basedir=3D${match[1]//.//}=0A= _alternative \=0A= 'modules:module:compadd -qS. $basedir*~$basedir*.*(/:t)'=0A= ;;=0A= =0A= *)=0A= _message "unknown state: $state"=0A= ;;=0A= esac=0A= ------=_NextPart_000_0000_01C1D656.3921EA20 Content-Type: application/octet-stream; name="_servers" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="_servers" #compdef -servers-=0A= =0A= local match basedir=0A= =0A= cd $DYNAMO_HOME/servers=0A= match=3D()=0A= compset -P '(#b)(*.)'=0A= basedir=3D${match[1]//.//}=0A= _alternative 'servers:server:compadd $basedir*'=0A= ------=_NextPart_000_0000_01C1D656.3921EA20--