Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Jul 2013 13:13:25 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Warren Block <wblock@wonkity.com>
Cc:        freebsd-rc@freebsd.org
Subject:   Re: Proposal: multi-instance and self-contained rc.d script
Message-ID:  <154C0FE2-C895-4C65-98D7-59BED731E91E@bsdimp.com>
In-Reply-To: <alpine.BSF.2.00.1307011246090.44674@wonkity.com>
References:  <20130701.062953.1443190655468739608.hrs@allbsd.org> <20130630221032.GB43309@stack.nl> <alpine.BSF.2.00.1307010624530.29556@wonkity.com> <CAF6rxgmz7TCswUv0mojExsHimPhHM%2BR7ASw0MEYWy=2=bHHY=w@mail.gmail.com> <6E2CC3DE-E77E-4ECB-AA14-B90BAD2DFB3E@bsdimp.com> <alpine.BSF.2.00.1307011246090.44674@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Jul 1, 2013, at 12:47 PM, Warren Block wrote:

> On Mon, 1 Jul 2013, Warner Losh wrote:
>=20
>>=20
>> On Jul 1, 2013, at 12:27 PM, Eitan Adler wrote:
>>=20
>>> On Mon, Jul 1, 2013 at 3:25 PM, Warren Block <wblock@wonkity.com> =
wrote:
>>>> '/etc/rc.d/routed manpage' would return the generated mdoc code.
>>>> '/etc/rc.d/routed help' could pipe that output to man.
>>>=20
>>> We should discourage directly running rc.d scripts and should =
instead
>>> encourage people to use the service(1) interface.
>>>=20
>>> +1 for both ideas though: they both sound like a very good direction =
to go in.
>>=20
>> I just need a tcsh magic command to make command completion work with =
service. :)
>=20
> Like this?
>=20
>  complete service      'c/-/(e l r v)/' \
>                        'p/1/`service -l`/' \
>                        'n/*/(start stop reload restart status rcvar =
onestart onestop)/'

That works, as does the more complicated:

set =
_service=3D({fast,one,force,}{start,stop,reload,restart,status,rcvar,jails=
tatus,poll})
complete service    'c/-/(e l r v)/' \
                    'p/1/`service -l`/' \
                    'n/*/$_service/'

Warner=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?154C0FE2-C895-4C65-98D7-59BED731E91E>