summaryrefslogtreecommitdiffstats
path: root/Completion/User/_cvs
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-01-14 09:14:18 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-01-14 09:14:18 +0000
commit2367f63ee23877b99418a962459bd6fea84e47e5 (patch)
tree4f08d015695519abd8d321e634d91ef6853d883c /Completion/User/_cvs
parentzsh-workers/9315 (diff)
downloadzsh-2367f63ee23877b99418a962459bd6fea84e47e5.tar
zsh-2367f63ee23877b99418a962459bd6fea84e47e5.tar.gz
zsh-2367f63ee23877b99418a962459bd6fea84e47e5.tar.bz2
zsh-2367f63ee23877b99418a962459bd6fea84e47e5.tar.lz
zsh-2367f63ee23877b99418a962459bd6fea84e47e5.tar.xz
zsh-2367f63ee23877b99418a962459bd6fea84e47e5.tar.zst
zsh-2367f63ee23877b99418a962459bd6fea84e47e5.zip
zsh-workers/9316
Diffstat (limited to 'Completion/User/_cvs')
-rw-r--r--Completion/User/_cvs16
1 files changed, 13 insertions, 3 deletions
diff --git a/Completion/User/_cvs b/Completion/User/_cvs
index 908c607b0..d460463a3 100644
--- a/Completion/User/_cvs
+++ b/Completion/User/_cvs
@@ -388,6 +388,15 @@ _cvs_watchers () {
'*: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 @@ _cvs_root () {
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 @@ _cvs_extract_file_entries () {
(( $+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