about summary refs log tree commit diff
path: root/Completion/Core/compinit
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-10-18 09:46:07 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-10-18 09:46:07 +0000
commit437294af796f2c1530ef942f53c823ba0753556f (patch)
tree0ed0cf72a78272e2da5fb8ccca1d131a9c3f2ddd /Completion/Core/compinit
parentb852c1f6cf50aaa37c9d2e8cbeb63f74b9e5d01f (diff)
downloadzsh-437294af796f2c1530ef942f53c823ba0753556f.tar.gz
zsh-437294af796f2c1530ef942f53c823ba0753556f.tar.xz
zsh-437294af796f2c1530ef942f53c823ba0753556f.zip
zsh-workers/8313
Diffstat (limited to 'Completion/Core/compinit')
-rw-r--r--Completion/Core/compinit5
1 files changed, 3 insertions, 2 deletions
diff --git a/Completion/Core/compinit b/Completion/Core/compinit
index 16148a945..ca9240f92 100644
--- a/Completion/Core/compinit
+++ b/Completion/Core/compinit
@@ -368,7 +368,7 @@ compconf() {
 
 # Utility function to call a function if it exists.
 #
-# Usage: call <return> <name> [ <args> ... ]
+# Usage: funcall <return> <name> [ <args> ... ]
 #
 # If a function named <name> is defined (or defined to be autoloaded),
 # it is called. If <return> is given not the string `-' or empty, it is
@@ -385,10 +385,11 @@ funcall() {
 
   shift
 
-  if builtin functions "$1"; then
+  if builtin functions "$1" >& /dev/null; then
     "$@"
     _ret="$?"
     [[ -n "$_name" ]] && eval "${_name}=${_ret}"
+    compstate[restore]=''
     return 0
   fi
   return 1