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

Re: init.d completion



"Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx> writes:

> Most (many) of scripts in our /etc/init.d are not executable,

All of them are here (Red Hat Linux - Wolverine), and I think they should be...
Anyway, running with "service foo start" is easier than completing a
specific directory... the first argument should be completed with
/etc/init.d/* (minus functions), the second would be possible
arguments of this script. This can be found in the usage string:

"Usage: $0 {start|stop|status|restart|condrestart|reload}"

Just grep what's inside the curly braces, and split it on "|".

-- 
Trond Eivind Glomsrød
Red Hat, Inc.



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