From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25160 invoked from network); 14 Jan 2000 09:13:55 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 14 Jan 2000 09:13:55 -0000 Received: (qmail 4184 invoked by alias); 14 Jan 2000 09:13:45 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9316 Received: (qmail 4177 invoked from network); 14 Jan 2000 09:13:44 -0000 To: zsh-workers@sunsite.auc.dk Subject: PATCH: _cvs on zsh without dynamic-linking modules. MIME-Version: 1.0 (generated by AKEMI 1.13.2 - =?ISO-2022-JP?B?Ig==?= =?ISO-2022-JP?B?GyRCQTA0Y0s8GyhCIg==?=) Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 14 Jan 2000 18:13:41 +0900 Message-ID: User-Agent: Chao-gnus/6.12.5 AKEMI/1.13.2 (=?ISO-2022-JP?B?GyRCQTAbKEI=?= =?ISO-2022-JP?B?GyRCNGNLPBsoQg==?=) FLAM-DOODLE/1.12.6 (=?ISO-2022-JP?B?GyRCM3cbKEI=?= 10R4.0/5.0) Emacs/20.4 (sparc-sun-solaris2.6) MULE/4.0 (HANANOEN) I found a problem with _cvs on zsh without dynamic-linking modules. Z:akr@is27e1u11% ../zz/bin/zsh.old -f is27e1u11% bindkey -e; autoload -U compinit; compinit -D is27e1u11% cvs commit _cvs_extract_modifiedfile_entries:2: failed to load module: zsh/stat is27e1u11% cvs commit This patch tries to detect zsh/stat module more carefuly. Index: Completion/User/_cvs =================================================================== RCS file: /projects/zsh/zsh/Completion/User/_cvs,v retrieving revision 1.1.1.24 diff -u -r1.1.1.24 _cvs --- Completion/User/_cvs 2000/01/09 02:31:55 1.1.1.24 +++ Completion/User/_cvs 2000/01/14 09:06:53 @@ -388,6 +388,15 @@ '*:file:_cvs_files' } +(( $+functions[_cvs_loadstat] )) || +_cvs_loadstat () { + zstyle -t ":completion${curcontext}:cvs" disable-stat && return + (( $+_cvs_loadstat_tried )) && return + _cvs_loadstat_tried=yes + + zmodload -i zsh/stat 2>/dev/null +} + (( $+functions[_cvs_root] )) || _cvs_root () { local cvspassfile id @@ -395,7 +404,8 @@ typeset -gU _cvs_roots if [[ -f "${cvspassfile::=${CVS_PASSFILE:-$HOME/.cvspass}}" ]]; then - if zmodload -e stat; then + _cvs_loadstat + if (( $+builtins[stat] )); then id="$(LANG=C builtin stat -g +mtime -F '%Y/%m/%d-%T' "$cvspassfile")" else id="$(LANG=C ls -l "$cvspassfile")" @@ -508,8 +518,8 @@ (( $+functions[_cvs_extract_modifiedfile_entries] )) || _cvs_extract_modifiedfile_entries () { - if zstyle -t ":completion${curcontext}:cvs" disable-stat || - ! { zmodload -e zsh/stat || zmodload zsh/stat }; then + _cvs_loadstat + if (( ! $+builtins[stat] )); then _cvs_extract_file_entries return fi -- Tanaka Akira