about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/compaudit8
-rw-r--r--Completion/compinstall14
2 files changed, 15 insertions, 7 deletions
diff --git a/Completion/compaudit b/Completion/compaudit
index 9cab88bbf..f03949822 100644
--- a/Completion/compaudit
+++ b/Completion/compaudit
@@ -55,11 +55,11 @@ if [[ -n $_compdir ]]; then
     # Too few files: we need some more directories, or we need to check
     # that all directories (not just Base) are present.
     _i_addfiles=()
-    if [[ $_compdir = */Base ]]; then
-      # Add all the Completion subdirectories
-      _i_addfiles=(${_compdir:h}/*(/))
+    if [[ -d $_compdir/Base/Core ]]; then
+      # Add all the Completion subdirectories (CVS-layout)
+      _i_addfiles=(${_compdir}/*/*(/))
     elif [[ -d $_compdir/Base ]]; then
-      # Likewise
+      # Likewise (installation-layout)
       _i_addfiles=(${_compdir}/*(/))
     fi
     for _i_line in {1..$#i_addfiles}; do
diff --git a/Completion/compinstall b/Completion/compinstall
index 971816ea8..b7b4a8412 100644
--- a/Completion/compinstall
+++ b/Completion/compinstall
@@ -190,7 +190,9 @@ __ci_set_compdir() {
 
 __ci_set_compdir $fpath
 
-if [[ -d $compdir/Base ]]; then
+if [[ -d $compdir/Base/Core ]]; then
+  subdirs=2
+elif [[ -d $compdir/Base ]]; then
   subdirs=1
   ### compdir=${compdir:h}
 fi
@@ -229,12 +231,18 @@ initialised completion in this shell, you should do so, then run
 compinstall again."
     fi
   fi
-  if [[ -n $subdirs ]]; then
+  if [[ $subdirs = 2 ]]; then
+    fpath_line=($compdir/[A-Z]*/[A-Z]*)
+    fpath_line="fpath=($fpath ${(F)fpath_line})"
+  elif [[ -n $subdirs ]]; then
     fpath_line=($compdir/[A-Z]*)
     fpath_line="fpath=($fpath ${(F)fpath_line})"
   fi
 else
-  if [[ -n $subdirs ]]; then
+  if [[ $subdirs = 2 ]]; then
+    print "Completion directories $compdir/*/*
+are already in your \$fpath, good."
+  elif [[ -n $subdirs ]]; then
     print "Completion directories $compdir/*
 are already in your \$fpath, good."
   else