diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-04-02 11:13:22 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-04-02 11:13:22 +0000 |
commit | 41ffadf78ffb41447573122f3e2995b775569620 (patch) | |
tree | 7a9749049b4e1c4fe31f537606106c0665bae9c0 | |
parent | 126524eab10e24157ddcec14090bc5b3b69cd340 (diff) | |
download | zsh-41ffadf78ffb41447573122f3e2995b775569620.tar.gz zsh-41ffadf78ffb41447573122f3e2995b775569620.tar.xz zsh-41ffadf78ffb41447573122f3e2995b775569620.zip |
moved to Completion/Base/Utility/_call_function
-rw-r--r-- | Completion/Core/_funcall | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/Completion/Core/_funcall b/Completion/Core/_funcall deleted file mode 100644 index 540f8ae83..000000000 --- a/Completion/Core/_funcall +++ /dev/null @@ -1,32 +0,0 @@ -#autoload - -# Utility function to call a function if it exists. -# -# 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 -# taken as the name of a parameter and the return status of the function -# called is stored in this parameter. All other arguments are given -# to the function called. -# The return value of this function is zero if the function was -# called and non-zero otherwise. - -local _name _ret - -[[ "$1" != (|-) ]] && _name="$1" - -shift - -if (( $+functions[$1] )); then - "$@" - _ret="$?" - - [[ -n "$_name" ]] && eval "${_name}=${_ret}" - - compstate[restore]='' - - return 0 -fi - -return 1 |