about summary refs log tree commit diff
path: root/Completion/Mandriva
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Mandriva')
-rw-r--r--Completion/Mandriva/Command/_rebootin36
1 files changed, 19 insertions, 17 deletions
diff --git a/Completion/Mandriva/Command/_rebootin b/Completion/Mandriva/Command/_rebootin
index 1b69609f3..3f30b2591 100644
--- a/Completion/Mandriva/Command/_rebootin
+++ b/Completion/Mandriva/Command/_rebootin
@@ -1,27 +1,29 @@
 #compdef rebootin
 
+local context state line expl
+typeset -A opt_args
 local loader=$(sudo detectloader -q)
 
-_arguments -C -s \
+_arguments -s \
     '-n[no immediate reboot just set the flags for next reboot]' \
     '-f[create a /fastboot file to reboot in fastboot mode]' \
     '*::arguments:->loader_entry'
 
-local expl
 case $state in
-    loader_entry)
-	case $loader in
-	    GRUB)
-		if [ -r /boot/grub/menu.lst ];then
-		compadd ${${(M)${(f)"$(</boot/grub/menu.lst)"}##title *}#title }
-		fi
-		;;
-	    LILO)
-		if [ -r /etc/lilo.conf ];then
-		compadd $(awk -F= '{ if ($0 ~ /label=/) print $2 }' /etc/lilo.conf)
-		fi
-		;;
-	    *)
-		;;
-	esac
+  loader_entry)
+    case $loader in
+      GRUB)
+	if [ -r /boot/grub/menu.lst ]; then
+	  _wanted -C $context entries expl entry \
+	      compadd ${${(M)${(f)"$(</boot/grub/menu.lst)"}##title *}#title }
+	fi
+      ;;
+      LILO)
+	if [ -r /etc/lilo.conf ]; then
+	  _wanted -C $context entries expl entry \
+	      compadd $(awk -F= '{ if ($0 ~ /label=/) print $2 }' /etc/lilo.conf)
+	fi
+      ;;
+    esac
+  ;;
 esac