From 986956a7cacf27d9ee67254ea78b439ccd342d8b Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Fri, 17 Sep 1999 03:02:18 +0000 Subject: zsh-workers/7891 --- Completion/Core/compinit | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Completion/Core/compinit') diff --git a/Completion/Core/compinit b/Completion/Core/compinit index 209ecc6e8..355fb8672 100644 --- a/Completion/Core/compinit +++ b/Completion/Core/compinit @@ -152,6 +152,11 @@ compdef() { # Get the options. + if [[ $#* -eq 0 ]]; then + echo "compdef needs parameters" + return 1 + fi + while getopts "anpPkd" opt; do case "$opt" in a) autol=yes;; @@ -175,6 +180,11 @@ compdef() { done shift OPTIND-1 + if [[ $#* -eq 0 ]]; then + echo "compdef needs parameters" + return 1 + fi + if [[ -z "$delete" ]]; then # Adding definitions, first get the name of the function name # and probably do autoloading. -- cgit 1.4.1