Home | Docs | Forums | Lists | Bugs | Planet | Store | GMN | Get Gentoo!
View Bug Activity | Format For Printing | XML | Clone This Bug
I think this is probably long overdue - currently, because the Gentoo runscripts don't use the Unix format, the zsh completion for init.d scripts fails to detect anything and falls back on the predefined start / stop. The file for this completion is /usr/share/zsh/4.2.1/functions/Completion/Unix/_init_d. Simply changing the line "cmds=(start stop)" to "cmds(start stop restart pause zap status)" would add a lot of needed functionality. If we were to go further with this, we could get these from the opts var so that even custom params will be available in the list. The problem is getting the contents of that opts variable without actually running the script - which is why we'd need to use the combination of both the defaults and the script to find addon commands in here somewhere. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Thanks for the bug report. Changed "cmds=(start stop)" to "cmds(start stop restart pause zap status)". (in zsh-4.0.9-r4 and zsh-4.2.1-r1) Your proposal seems interesting, but I don't have much time to implelment it at the moment. I'll keep this bug open until someone will post a patch for it ;-)
Created an attachment (id=48008) [edit] _init_d patch on top of the _init_d from a standard gentoo zsh(4.2.1) install This works nicely for me. Note that if opts are specified on multiple lines like this, it won't work: opts="start stop" Anyway, none of the init scripts on my system are like that. Sourcing would fix that potential problem, but would cause other bugs. bug #75225 (comments 3 & 4)
Thanks oberyno. I updated zsh-init.d-gentoo.diff in CVS.