Date: Tue, 11 Jun 2013 20:48:44 GMT From: Olli Hauer <ohauer@FreeBSD.org> To: FreeBSD-gnats-submit@freebsd.org Subject: docs/179497: [patch] service.8 add csh completion example Message-ID: <201306112048.r5BKmiIH008750@freefall.freebsd.org> Resent-Message-ID: <201306112050.r5BKo0GI008819@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 179497 >Category: docs >Synopsis: [patch] service.8 add csh completion example >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jun 11 20:50:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Olli Hauer >Release: FreeBSD 8.4-RELEASE amd64 >Organization: >Environment: System: FreeBSD donot.tell 8.4-RELEASE FreeBSD 8.4-RELEASE #0 r251259: Sun Jun 2 21:26:57 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: service(8) has an example for bash completion, however bash is third party and in /usr/share/examples/csh/dot.cshrc is a working example for csh. Extend the service(8) manpage with the completion ripped from dot.cshrc >How-To-Repeat: avoid bash and use csh as shell ;) >Fix: --- service_8.diff begins here --- Index: usr.sbin/service/service.8 =================================================================== --- usr.sbin/service/service.8 (revision 251637) +++ usr.sbin/service/service.8 (working copy) @@ -110,6 +110,13 @@ .Dl "service -rv" .Pp The following programmable completion entry can be use in +.Xr csh 1 +for the names and common commands of the rc.d scripts: +.Dl "complete service 'c/-/(e l r v)/' 'p/1/`service -l`/' \e" +.Dl " 'n/*/(start stop reload restart \e" +.Dl " status rcvar onestart onestop)/'" +.Pp +The following programmable completion entry can be use in .Xr bash 1 for the names of the rc.d scripts: .Dl "_service () {" @@ -120,6 +127,7 @@ .Dl "}" .Dl "complete -F _service service" .Sh SEE ALSO +.Xr csh 1 , .Xr bash 1 Pq Pa ports/shells/bash , .Xr rc.conf 5 , .Xr rc 8 , --- service_8.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306112048.r5BKmiIH008750>