mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-10 12:40:58 +02:00
handle sub-sub-directories of $_compdir as in the CVS-layout (14107)
This commit is contained in:
parent
aa99b19c08
commit
727912d1cb
4 changed files with 23 additions and 10 deletions
|
@ -1,5 +1,9 @@
|
||||||
2001-04-26 Sven Wischnowsky <wischnow@zsh.org>
|
2001-04-26 Sven Wischnowsky <wischnow@zsh.org>
|
||||||
|
|
||||||
|
* 14107: Completion/compaudit, Completion/compinstall,
|
||||||
|
Doc/Zsh/compsys.yo: handle sub-sub-directories of $_compdir as
|
||||||
|
in the CVS-layout
|
||||||
|
|
||||||
* 14105: Completion/Base/Utility/_arguments,
|
* 14105: Completion/Base/Utility/_arguments,
|
||||||
Completion/Base/Utility/_guard,
|
Completion/Base/Utility/_guard,
|
||||||
Completion/X/Utility/_x_arguments,
|
Completion/X/Utility/_x_arguments,
|
||||||
|
|
|
@ -55,11 +55,11 @@ if [[ -n $_compdir ]]; then
|
||||||
# Too few files: we need some more directories, or we need to check
|
# Too few files: we need some more directories, or we need to check
|
||||||
# that all directories (not just Base) are present.
|
# that all directories (not just Base) are present.
|
||||||
_i_addfiles=()
|
_i_addfiles=()
|
||||||
if [[ $_compdir = */Base ]]; then
|
if [[ -d $_compdir/Base/Core ]]; then
|
||||||
# Add all the Completion subdirectories
|
# Add all the Completion subdirectories (CVS-layout)
|
||||||
_i_addfiles=(${_compdir:h}/*(/))
|
_i_addfiles=(${_compdir}/*/*(/))
|
||||||
elif [[ -d $_compdir/Base ]]; then
|
elif [[ -d $_compdir/Base ]]; then
|
||||||
# Likewise
|
# Likewise (installation-layout)
|
||||||
_i_addfiles=(${_compdir}/*(/))
|
_i_addfiles=(${_compdir}/*(/))
|
||||||
fi
|
fi
|
||||||
for _i_line in {1..$#i_addfiles}; do
|
for _i_line in {1..$#i_addfiles}; do
|
||||||
|
|
|
@ -190,7 +190,9 @@ __ci_set_compdir() {
|
||||||
|
|
||||||
__ci_set_compdir $fpath
|
__ci_set_compdir $fpath
|
||||||
|
|
||||||
if [[ -d $compdir/Base ]]; then
|
if [[ -d $compdir/Base/Core ]]; then
|
||||||
|
subdirs=2
|
||||||
|
elif [[ -d $compdir/Base ]]; then
|
||||||
subdirs=1
|
subdirs=1
|
||||||
### compdir=${compdir:h}
|
### compdir=${compdir:h}
|
||||||
fi
|
fi
|
||||||
|
@ -229,12 +231,18 @@ initialised completion in this shell, you should do so, then run
|
||||||
compinstall again."
|
compinstall again."
|
||||||
fi
|
fi
|
||||||
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=($compdir/[A-Z]*)
|
||||||
fpath_line="fpath=($fpath ${(F)fpath_line})"
|
fpath_line="fpath=($fpath ${(F)fpath_line})"
|
||||||
fi
|
fi
|
||||||
else
|
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/*
|
print "Completion directories $compdir/*
|
||||||
are already in your \$fpath, good."
|
are already in your \$fpath, good."
|
||||||
else
|
else
|
||||||
|
|
|
@ -142,9 +142,10 @@ contains the required directories for the standard functions.
|
||||||
For incomplete installations, if tt(compinit) does not find enough files
|
For incomplete installations, if tt(compinit) does not find enough files
|
||||||
beginning with an underscore (fewer than twenty) in the search path, it
|
beginning with an underscore (fewer than twenty) in the search path, it
|
||||||
will try to find more by adding the directory tt(_compdir) to the search
|
will try to find more by adding the directory tt(_compdir) to the search
|
||||||
path. Furthermore, if the directory in question ends in the path segment
|
path. If that directory has a subdirectory named tt(Base), all
|
||||||
tt(Base), or has a subdirectory named tt(Base), tt(compinit) will add all
|
subdirectories will be added to the path. Furthermore, if the subdirectory
|
||||||
subdirectories of the directory where tt(Base) is to the path: this allows
|
tt(Base) has a subdirectory named tt(Core), tt(compinit) will add all
|
||||||
|
subdirectories of the subdirectories is to the path: this allows
|
||||||
the functions to be in the same format as in the tt(zsh) source
|
the functions to be in the same format as in the tt(zsh) source
|
||||||
distribution.
|
distribution.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue