From ohauer@FreeBSD.org  Tue Jun 11 20:48:44 2013
Return-Path: <ohauer@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id 52A9C8A9
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 11 Jun 2013 20:48:44 +0000 (UTC)
	(envelope-from ohauer@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87])
	by mx1.freebsd.org (Postfix) with ESMTP id 433E81C2E
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 11 Jun 2013 20:48:44 +0000 (UTC)
Received: from freefall.freebsd.org (localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r5BKmirV008751
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 11 Jun 2013 20:48:44 GMT
	(envelope-from ohauer@freefall.freebsd.org)
Received: (from ohauer@localhost)
	by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r5BKmiIH008750;
	Tue, 11 Jun 2013 20:48:44 GMT
	(envelope-from ohauer)
Message-Id: <201306112048.r5BKmiIH008750@freefall.freebsd.org>
Date: Tue, 11 Jun 2013 20:48:44 GMT
From: Olli Hauer <ohauer@FreeBSD.org>
Reply-To: Olli Hauer <ohauer@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] service.8 add csh completion example
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>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:
