about summary refs log tree commit diff
path: root/Completion/Cvs/_cvs_modules
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-08-26 11:08:17 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-08-26 11:08:17 +0000
commita41988aba4fa0e5286278253780804e5e3259629 (patch)
tree889aa81daf12359e99be4f5062a86c44c28d0b48 /Completion/Cvs/_cvs_modules
parent54f3a6bd29ea9ebb164a2690ae4792f0ec9290e2 (diff)
downloadzsh-a41988aba4fa0e5286278253780804e5e3259629.tar.gz
zsh-a41988aba4fa0e5286278253780804e5e3259629.tar.xz
zsh-a41988aba4fa0e5286278253780804e5e3259629.zip
Initial revision
Diffstat (limited to 'Completion/Cvs/_cvs_modules')
-rw-r--r--Completion/Cvs/_cvs_modules12
1 files changed, 12 insertions, 0 deletions
diff --git a/Completion/Cvs/_cvs_modules b/Completion/Cvs/_cvs_modules
new file mode 100644
index 000000000..f662f8a6e
--- /dev/null
+++ b/Completion/Cvs/_cvs_modules
@@ -0,0 +1,12 @@
+#autoload
+
+local root=$CVSROOT
+[[ -f CVS/Root ]] && root=$(<CVS/Root)
+
+if [[ $root = :* || ! -d $root ]]; then
+  _message "module name"
+else
+  compadd - \
+    $root/^CVSROOT(:t) \
+    ${${(M)${(f)"$(<$root/CVSROOT/modules)"}:#[^#]*}%%[ 	]*}
+fi