diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2002-06-23 04:52:39 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2002-06-23 04:52:39 +0000 |
commit | 273067d55d66db3909a6c38a56935606b4d08e57 (patch) | |
tree | 6fc045e185251f7bb0eadffc2515b25007327bc1 /Completion/compdump | |
parent | 19817c34d18fc850cff54971b98bc9aa1809d1b8 (diff) | |
download | zsh-273067d55d66db3909a6c38a56935606b4d08e57.tar.gz zsh-273067d55d66db3909a6c38a56935606b4d08e57.tar.xz zsh-273067d55d66db3909a6c38a56935606b4d08e57.zip |
users/5073: use typeset to get function names for compdump
Diffstat (limited to 'Completion/compdump')
-rw-r--r-- | Completion/compdump | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Completion/compdump b/Completion/compdump index 630d96c63..128cb841c 100644 --- a/Completion/compdump +++ b/Completion/compdump @@ -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 |