Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

bug: completion in _initd: forcereload instead of force-reload



Hi,
when I try to launch an init script with argument force-reload, 
completion is broken. ex:

/etc/init.d/kdm forc
<TAB>
/etc/init.d/kdm forcereload

(instead of force-reload).

_initd completion script has a list of possible arguments, finds 
matching lines and deletes everything except : [^a-z_]
It finds "force-reload" well, but then removes the dash in that token.
When using [^-a-z_], problem seems to be solved.

Here is my solution as a patch
arno


Index: Completion/Unix/Command/_init_d
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_init_d,v
retrieving revision 1.6
diff -r1.6 _init_d
18c18
<     cmds=( ${${(j:|:s:|:)${(M)${(f)"$(< $script)"}:#[[:blank:]]#(\'|)${~what}(\|${~what})#(\'|)\)}}//[^a-z_]} )
---
>     cmds=( ${${(j:|:s:|:)${(M)${(f)"$(< $script)"}:#[[:blank:]]#(\'|)${~what}(\|${~what})#(\'|)\)}}//[^-a-z_]} )

Attachment: signature.asc
Description: Digital signature



Messages sorted by: Reverse Date, Date, Thread, Author