From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4388 invoked from network); 27 Sep 2007 09:29:40 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 27 Sep 2007 09:29:40 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 99367 invoked from network); 27 Sep 2007 09:29:34 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 27 Sep 2007 09:29:34 -0000 Received: (qmail 13363 invoked by alias); 27 Sep 2007 09:29:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23839 Received: (qmail 13347 invoked from network); 27 Sep 2007 09:29:19 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 27 Sep 2007 09:29:19 -0000 Received: (qmail 98524 invoked from network); 27 Sep 2007 09:29:19 -0000 Received: from bgag400072.tk.mesh.ad.jp (133.205.19.68) by a.mx.sunsite.dk with SMTP; 27 Sep 2007 09:29:12 -0000 Received: from smtp-gw.biglobe.ne.jp by bgag400072.tk.mesh.ad.jp (kbkr/4518190707) with ESMTP id l8R9T96R001876 for ; Thu, 27 Sep 2007 18:29:09 +0900 X-Biglobe-Sender: Received: from [133.24.86.14] (133.24.86.14 [133.24.86.14]) by smtp-gw.biglobe.ne.jp id SABHAC15AFD8; Thu, 27 Sep 2007 18:29:08 +0900 (JST) Mime-Version: 1.0 X-Mailer: QUALCOMM MacOS X Eudora Version 6.2J rev3.3 Message-Id: Date: Thu, 27 Sep 2007 18:29:04 +0900 To: zsh-workers@sunsite.dk From: "Jun T." Subject: PATCH: _ls, _chflags, _file_systems, _comm (2) Content-Type: text/plain; charset="us-ascii" I'm re-posting this just in case my previous one (Sep.12) was lost by the trouble. Here are pathces for a few simple completion functions: _ls, _chflags, _file_systems Support darwin (MacOSX) _comm complete GNU options only if GNU version I hope they have no problems. =================================================================== diff -u zsh/Completion/Unix/Command/_ls zsh2/Completion/Unix/Command/_ls --- zsh/Completion/Unix/Command/_ls 2006-05-25 16:58:07.000000000 +0900 +++ zsh2/Completion/Unix/Command/_ls 2007-09-12 00:09:01.000000000 +0900 @@ -5,7 +5,7 @@ _pick_variant -r is_gnu gnu=gnu unix --help -if [[ "$OSTYPE" = (netbsd*|freebsd*|openbsd*) && "$is_gnu" != gnu ]]; then +if [[ "$OSTYPE" = (netbsd*|freebsd*|openbsd*|darwin*) && "$is_gnu" != gnu ]]; then arguments=( '(-A)-a[list entries starting with .]' '(-a)-A[list all except . and ..]' @@ -54,6 +54,13 @@ '*:files:_files' ) + if [[ "$OSTYPE" = (freebsd*|darwin*) ]]; then + arguments+=( + '-G[enable colorized output]' + '-H[follow symlinks on the command line]' + '-P[do not follow symlinks]' + ) + fi else arguments=( '(--all -a -A --almost-all)'{--all,-a}'[list entries starting with .]' =================================================================== diff -u zsh/Completion/BSD/Command/_chflags zsh2/Completion/BSD/Command/_chflags --- zsh/Completion/BSD/Command/_chflags 2005-05-11 18:27:09.000000000 +0900 +++ zsh2/Completion/BSD/Command/_chflags 2007-09-09 23:39:32.000000000 +0900 @@ -25,7 +25,7 @@ unset own fi -if [[ $OSTYPE = (freebsd|dragonfly)* ]]; then +if [[ $OSTYPE = (freebsd|dragonfly|darwin)* ]]; then flags=( $flags[@] '(nouunlnk)uunlnk[set the user undeletable flag]' '(uunlnk)nouunlnk[unset the user undeletable flag]' =================================================================== diff -u zsh/Completion/Unix/Type/_file_systems zsh2/Completion/Unix/Type/_file_systems --- zsh/Completion/Unix/Type/_file_systems 2005-06-08 21:45:35.000000000 +0900 +++ zsh2/Completion/Unix/Type/_file_systems 2007-09-11 23:01:53.000000000 +0900 @@ -20,6 +20,10 @@ fss=( cd9660 devfs ext2fs fdesc kernfs linprocfs mfs msdos nfs ntfs null nwfs portal procfs std udf ufs umap union ) ;; + darwin*) + fss=( afp cd9660 cddafs devfs fdesc hfs lfs msdos nfs + ntfs smbfs synthfs udf ufs volfs webdav ) + ;; *) # default for all other systems fss=( ufs ) =================================================================== diff -u zsh/Completion/Unix/Command/_comm zsh2/Completion/Unix/Command/_comm --- zsh/Completion/Unix/Command/_comm 2007-03-12 09:02:11.000000000 +0900 +++ zsh2/Completion/Unix/Command/_comm 2007-09-08 01:04:19.000000000 +0900 @@ -1,10 +1,20 @@ #compdef comm -_arguments -s \ - '-1[suppress lines unique to FILE1]' \ - '-2[suppress lines unique to FILE2]' \ - '-3[suppress lines that appear in both files]' \ - '--help' \ - '--version' \ - '1:file1 to compare:_files' \ +local -a args + +args=( + '-1[suppress lines unique to FILE1]' + '-2[suppress lines unique to FILE2]' + '-3[suppress lines that appear in both files]' + '1:file1 to compare:_files' '2:file2 to compare:_files' +) + +if _pick_variant gnu=GNU unix --version; then + args+=( + '(- : *)--version[display version information]' + '(- : *)--help[display help information]' + ) +fi + +_arguments -s $args