about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Core/compinit10
1 files changed, 10 insertions, 0 deletions
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.