From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23823 invoked from network); 16 May 2000 00:05:47 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 16 May 2000 00:05:47 -0000 Received: (qmail 29289 invoked by alias); 16 May 2000 00:05:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11394 Received: (qmail 29282 invoked from network); 16 May 2000 00:05:28 -0000 To: zsh-workers@sunsite.auc.dk Subject: PATCH: _cvs MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 16 May 2000 09:06:55 +0900 Message-ID: User-Agent: T-gnus/6.14.1 (based on Gnus v5.8.3) (revision 16) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/20.6 (i686-pc-linux-gnu) MULE/4.0 (HANANOEN) I rewrited filename completion functions in _cvs to: * complete removed files. * handle special characters in filenames more properly. Index: Completion/User/_cvs =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/User/_cvs,v retrieving revision 1.6 diff -u -r1.6 _cvs --- Completion/User/_cvs 2000/05/05 20:36:13 1.6 +++ Completion/User/_cvs 2000/05/15 23:59:29 @@ -36,7 +36,7 @@ (( $+functions[_cvs_command] )) || _cvs_command () { - local cmd + local cmd cvsroot="${opt_args[-d]:Q}" typeset -A cmds cmds=(add " ad new " admin " adm rcs " annotate " ann " checkout " co get " commit " ci com " diff " di dif " @@ -432,9 +432,18 @@ '-f[force to remove]' \ '(-R)-l[don'\''t recursive]' \ '(-l)-R[recursive]' \ - '*:file:_cvs_files_removed' + '*:file:_cvs_remove_arg' } +(( $+functions[_cvs_remove_arg] )) || +_cvs_remove_arg () { + if (( $+opt_args[-f] )); then + _cvs_files + else + _cvs_files_removed + fi +} + (( $+functions[_cvs_rtag] )) || _cvs_rtag () { # "+FanfQqlRdbr:D:" @@ -548,11 +557,12 @@ (( $+functions[_cvs_loadstat] )) || _cvs_loadstat () { - zstyle -t ":completion:${curcontext}:" disable-stat && return - (( $+_cvs_loadstat_tried )) && return - _cvs_loadstat_tried=yes + zstyle -t ":completion:${curcontext}:" disable-stat && return 1 + (( $+_cvs_loadstat_status )) && return $_cvs_loadstat_status zmodload -i zsh/stat 2>/dev/null + (( _cvs_loadstat_status = ! $+builtins[stat] )) + return $_cvs_loadstat_status } (( $+functions[_cvs_root] )) || @@ -562,8 +572,7 @@ typeset -gU _cvs_roots if [[ -f "${cvspassfile::=${CVS_PASSFILE:-$HOME/.cvspass}}" ]]; then - _cvs_loadstat - if (( $+builtins[stat] )); then + if _cvs_loadstat; then id="$(LC_ALL=C builtin stat -g +mtime -F '%Y/%m/%d-%T' "$cvspassfile")" else id="$(LC_ALL=C ls -l "$cvspassfile")" @@ -629,14 +638,26 @@ (( $+functions[_cvs_modules] )) || _cvs_modules () { - local root=$CVSROOT expl - + local root="$CVSROOT" expl [[ -f CVS/Root ]] && root=$(