From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3157 invoked from network); 14 Apr 2004 05:45:41 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 14 Apr 2004 05:45:41 -0000 Received: (qmail 9342 invoked by alias); 14 Apr 2004 05:45:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19775 Received: (qmail 9309 invoked from network); 14 Apr 2004 05:45:35 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 14 Apr 2004 05:45:35 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 14 Apr 2004 5:45:35 -0000 Received: (qmail 30631 invoked from network); 14 Apr 2004 05:45:35 -0000 Received: from grunt25.ihug.com.au (203.109.249.145) by a.mx.sunsite.dk with SMTP; 14 Apr 2004 05:45:31 -0000 Received: from p8-tnt6.syd.ihug.com.au (localhost.localdomain) [203.173.146.8] by grunt25.ihug.com.au with esmtp (Exim 3.35 #1 (Debian)) id 1BDdDC-0005cq-00; Wed, 14 Apr 2004 15:45:27 +1000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id i3E4dVaJ006611 for ; Wed, 14 Apr 2004 14:39:31 +1000 Received: (from doug@localhost) by localhost.localdomain (8.12.8/8.12.8/Submit) id i3E4dUvi006609 for zsh-workers@sunsite.dk; Wed, 14 Apr 2004 14:39:30 +1000 X-Authentication-Warning: localhost.localdomain: doug set sender to djkea2@mugca.its.monash.edu.au using -f Date: Wed, 14 Apr 2004 14:39:30 +1000 From: Doug Kearns To: zsh-workers@sunsite.dk Subject: PATCH: new completion for php Message-ID: <20040414043930.GC3830@localhost.localdomain> Mail-Followup-To: zsh-workers@sunsite.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 Here's a new completion function for the PHP command line interface. Regards, Doug Index: Completion/Unix/Command/_php =================================================================== RCS file: Completion/Unix/Command/_php diff -N Completion/Unix/Command/_php --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ Completion/Unix/Command/_php 14 Apr 2004 05:42:52 -0000 @@ -0,0 +1,37 @@ +#compdef php + +# PHP 4.3.6RC2 (cli) (built: Apr 14 2004 00:14:04) + +local curcontext="$curcontext" line state +typeset -A opt_args + +_arguments -S \ + {-a,--interactive}'[run interactively]' \ + {-c,--php-ini}'[look for php.ini file in the specified directory]:directory:_files -/' \ + {-n,--no-php-ini}'[no php.ini file will be used]' \ + {-d,--define}"[define INI entry]:configuration directive:->ini" \ + {-e,--profile-info}'[generate extended information for debugger/profiler]' \ + '(- *)'{-h,--help}'[display help information]' \ + '(- *)'{-i,--info}'[PHP information]' \ + '(-)'{-l,--syntax-check}'[syntax check only (lint)]' \ + '(- *)'{-m,--modules}'[show compiled in modules]' \ + '(1 -l --syntax-check -s --syntax-highlight -w --strip)'{-r,--run}'[run the specified PHP code without using script tags ]:PHP code:'\ + '(-)'{-s,--syntax-highlight}'[display colour syntax highlighted source]' \ + '(- *)'{-v,--version}'[display version information]' \ + '(-)'{-w,--strip}'[display source with stripped comments and whitespace]' \ + {-z,--zend-extension}'[load specified Zend extension]:extension file:_files' \ + '(-)1:PHP file:_files -g "*.php(-.)"' \ + '*:script argument:_files' && return + +case $state in + ini) + if compset -P '*='; then + _default + else + _message -e configuration-directives 'configuration directive' + fi + ;; +esac + +return 1 +