| Linux server27.hostingraja.org 2.6.32-954.3.5.lve1.4.93.el6.x86_64 #1 SMP Wed Oct 4 17:04:29 UTC 2023 x86_64 Path : /usr/share/zsh/4.3.11/functions/ |
| Current File : //usr/share/zsh/4.3.11/functions/_rebootin |
#compdef rebootin
local loader=$(sudo detectloader -q)
_arguments -C -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
esac