From owner-freebsd-doc@FreeBSD.ORG Tue Jun 11 20:50:00 2013 Return-Path: Delivered-To: freebsd-doc@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 96B2F9A5 for ; Tue, 11 Jun 2013 20:50:00 +0000 (UTC) (envelope-from gnats@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 78F1A1C41 for ; Tue, 11 Jun 2013 20:50:00 +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 r5BKo0Ff008820 for ; Tue, 11 Jun 2013 20:50:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r5BKo0GI008819; Tue, 11 Jun 2013 20:50:00 GMT (envelope-from gnats) Resent-Date: Tue, 11 Jun 2013 20:50:00 GMT Resent-Message-Id: <201306112050.r5BKo0GI008819@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Olli Hauer Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 52A9C8A9 for ; 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 ; 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 ; 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 To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: docs/179497: [patch] service.8 add csh completion example X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Olli Hauer List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2013 20:50:00 -0000 >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: