From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26164 invoked from network); 27 Jan 2000 14:52:02 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Jan 2000 14:52:02 -0000 Received: (qmail 29047 invoked by alias); 27 Jan 2000 14:51:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9436 Received: (qmail 29039 invoked from network); 27 Jan 2000 14:51:53 -0000 To: zsh-workers@math.gatech.edu Subject: PATCH: _diff (new), _prcs (upgrade) X-Attribution: adl From: Alexandre Duret-Lutz Date: 27 Jan 2000 15:52:23 +0100 Message-ID: User-Agent: Gnus/5.070096 (Pterodactyl Gnus v0.96) Emacs/20.5 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Here is a diff completion fonction. I have separated _diff_options (complete options) from _diff (also complete filenames), so that completion functions like _prcs may use only _diff_options. Index: Completion/User/_prcs --- Completion/User/_prcs Mon, 24 Jan 2000 13:13:23 +0100 Alexandre +++ Completion/User/_prcs Thu, 27 Jan 2000 15:39:51 +0100 Alexandre @@ -65,6 +65,7 @@ compress\:"instruct PRCS to save disk space for project" init\:"create a repository entry" pdelete\:"delete a repository entry" + pinfo\:"list all projects in the repository" prename\:"rename a repository entry" rebuild\:"reconstruct PRCS data files in the repository" uncompress\:"instruct PRCS to save time in processing project"))' @@ -75,6 +76,9 @@ access|compress|init|pdelete|prename|rebuild) _prcs_arguments ':project name:_prcs_projects' ;; + pinfo) + _prcs_arguments + ;; uncompress) _prcs_arguments \ '-i[expand the entire project immediately]' \ @@ -120,11 +124,6 @@ '*:file or directory:_files' ;; diff) -# -# FIXME: when there will be a _diff completion function, -# we should complete with diff options after `--' : -# prcs diff [OPTION ...] [PROJECT [FILE-OR-DIR ...]] [-- [DIFF-OPTION ...]] -# _prcs_arguments \ '*--revison=[version of the project]:revision:' \ '*-r[version of the project]:revision:' \ @@ -134,6 +133,7 @@ '(--new)-N[compare new files against empty files]' \ "(-P)--exclude-project-file[don't diff the project file]" \ "(--exclude-project-file)-P[don't diff the project file]" \ + '--[introduce diff options]:*:diff options: _diff_options' \ ':project name:_prcs_projects' \ '*:file or directory:_files' ;; Index: Completion/User/_diff_options --- Completion/User/_diff_options Thu, 27 Jan 2000 15:51:05 +0100 Alexandre +++ Completion/User/_diff_options Thu, 27 Jan 2000 15:38:01 +0100 Alexandre @@ -0,0 +1,127 @@ +#autoload + +local of ofwuc ouc oss ofwy ofwg ofwl + +(( $+_diff_is_gnu )) || { + _diff_is_gnu=0; + [[ $(diff -v