1#compdef update-rc.d 2 3local curcontext="$curcontext" state line expl 4 5_arguments -C \ 6 '-n[show actions without performing them]' \ 7 '-f[force removal of symlinks]' \ 8 '1:service:_services' \ 9 '2:command:(remove defaults start stop)' \ 10 '*::args:->args' && return 11 12case $words[2] in 13 defaults) 14 _message -e number 'sequence number' 15 ;; 16 remove) 17 _message 'no more arguments' 18 ;; 19 st*) 20 case ${words[CURRENT-1]} in 21 .) _wanted commands expl commands compadd start stop && return ;; 22 start|stop) _message -e number 'sequence number' ;; 23 *) _message -e runlevels run\ level ;; 24 esac 25 ;; 26esac 27 28return 1 29