diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2005-08-15 03:30:22 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2005-08-15 03:30:22 +0000 |
commit | 0763d76e2dc80886b85489282a58a84cc2eb9526 (patch) | |
tree | 794529274da9790f8434b547d88fb13483b55dc8 | |
parent | 27efdc8dab4be9f9662b4990e81913ec3766193c (diff) | |
download | zsh-0763d76e2dc80886b85489282a58a84cc2eb9526.tar.gz zsh-0763d76e2dc80886b85489282a58a84cc2eb9526.tar.xz zsh-0763d76e2dc80886b85489282a58a84cc2eb9526.zip |
21369: assign to array with "builtin stat"
rather than parsing its stdout
-rw-r--r-- | Completion/Unix/Command/_cvs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_cvs b/Completion/Unix/Command/_cvs index 3a8775c5e..11411cf0c 100644 --- a/Completion/Unix/Command/_cvs +++ b/Completion/Unix/Command/_cvs @@ -868,8 +868,11 @@ _cvs_modified_entries() { : ${PREFIX:#(#b)(*/)(*)} linedir="$match[1]" realdir=${(e)~linedir} - [[ -f "$realdir"CVS/Entries ]] && - [[ -n ${pat::="${(@j:|:)${(@)${(@)${(@)${(@)${(@)${(@M)${(@f)"$(<"$realdir"CVS/Entries)"}:#/*}#/}/${slash}[^${slash}]#${slash}//}%/[^/]#/[^/]#}:#${(j:|:)~${${${${(f)"$(LC_ALL=C builtin stat -gn +mtime -F '%a %b %e %T %Y' ${realdir}*(D) 2>/dev/null)"}##*/}/ //}//(#m)[][*?()<|^~#\\]/\\$MATCH}}}%%/*}//(#m)[][*?()<|^~#\\]/\\$MATCH}"} ]] && + [[ -f "$realdir"CVS/Entries ]] && { + local -a mtime + LC_ALL=C builtin stat -A mtime -gn +mtime -F $'%a %b %e %T %Y\n' ${realdir}*(D) 2>/dev/null + [[ -n ${pat::="${(@j:|:)${(@)${(@)${(@)${(@)${(@)${(@M)${(@f)"$(<"$realdir"CVS/Entries)"}:#/*}#/}/${slash}[^${slash}]#${slash}//}%/[^/]#/[^/]#}:#${(j:|:)~${(f)${(j:/:)${mtime##*/}}//(#m)[][*?()<|^~#\\]/\\$MATCH}#/}}%%/*}//(#m)[][*?()<|^~#\\]/\\$MATCH}"} ]] + } && _wanted files expl 'modified file' _path_files -g "$pat" else _cvs_existing_entries |