about summary refs log tree commit diff
path: root/Completion/Zsh/Type/_functions
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2011-03-08 16:08:37 +0000
committerBart Schaefer <barts@users.sourceforge.net>2011-03-08 16:08:37 +0000
commit07d1d2d402ef01825833f4c09b4de88c2391cc78 (patch)
tree208c42a7448abec401550a9d32498cd756d9a67b /Completion/Zsh/Type/_functions
parent7bc97b920b74e7d9046c8a4489ecd0a0e646bdde (diff)
downloadzsh-07d1d2d402ef01825833f4c09b4de88c2391cc78.tar.gz
zsh-07d1d2d402ef01825833f4c09b4de88c2391cc78.tar.xz
zsh-07d1d2d402ef01825833f4c09b4de88c2391cc78.zip
Greg Klanderman: 28846: adapt prefix-needed zstyle to handle the
completion function naming convention of a leading underscore.
Diffstat (limited to 'Completion/Zsh/Type/_functions')
-rw-r--r--Completion/Zsh/Type/_functions8
1 files changed, 6 insertions, 2 deletions
diff --git a/Completion/Zsh/Type/_functions b/Completion/Zsh/Type/_functions
index 912a7f134..4d336695d 100644
--- a/Completion/Zsh/Type/_functions
+++ b/Completion/Zsh/Type/_functions
@@ -1,5 +1,9 @@
 #compdef unfunction
 
-local expl
+local expl ffilt
 
-_wanted functions expl 'shell function' compadd -k "$@" - functions
+zstyle -t ":completion:${curcontext}:functions" prefix-needed && \
+ [[ $PREFIX != [_.]* ]] && \
+ ffilt='[(I)[^_.]*]'
+
+_wanted functions expl 'shell function' compadd -k "$@" - "functions$ffilt"