From: Tanaka Akira <akr@jaist.ac.jp>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: _cvs on zsh without dynamic-linking modules.
Date: 14 Jan 2000 18:13:41 +0900 [thread overview]
Message-ID: <rsqln5thv7e.fsf@crane.jaist.ac.jp> (raw)
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 <TAB>
_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
reply other threads:[~2000-01-14 9:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=rsqln5thv7e.fsf@crane.jaist.ac.jp \
--to=akr@jaist.ac.jp \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).