1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-16 02:32:11 +02:00

users/5073: use typeset to get function names for compdump

This commit is contained in:
Bart Schaefer 2002-06-23 04:52:39 +00:00
parent 19817c34d1
commit 273067d55d
2 changed files with 8 additions and 7 deletions

View file

@ -1,3 +1,8 @@
2002-06-22 Bart Schaefer <schaefer@zsh.org>
* users/5073: Completion/compdump: use `typeset +f' instead of
`whence -w' to get names of completion functions.
2002-06-20 Peter Stephenson <pws@csr.com>
* 17334: Src/builtin.c, Src/options.c, Src/params.c, Src/zsh.h,

View file

@ -101,13 +101,9 @@ bindkey |
print >> $_d_file
# Autoloads: whence -w produces "_d_foo: function", so look for
# all functions beginning with `_'.
# Autoloads: look for all functions beginning with `_'.
_d_als=($(whence -wm '_*' | sort |
while read -rA _d_line; do
[[ ${_d_line[2]} = function ]] && print -r - ${_d_line[1]%:}
done))
_d_als=(${(o)$(typeset +fm '_*')})
# print them out: about five to a line looks neat
@ -116,7 +112,7 @@ print -n autoload -U >> $_d_file
while (( $#_d_als )); do
if (( ! $+_compautos[$_d_als[1]] )); then
print -n " $_d_als[1]"
if (( ! _i-- && $#_d_als > 1 )); then
if (( ! --_i && $#_d_als > 1 )); then
_i=5
print -n ' \\\n '
fi