From owner-svn-src-head@freebsd.org Fri Jan 11 19:16:50 2019 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C10CD1499536; Fri, 11 Jan 2019 19:16:50 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1352381856; Fri, 11 Jan 2019 19:16:40 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0BJGcbB022600; Fri, 11 Jan 2019 11:16:38 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0BJGcLG022599; Fri, 11 Jan 2019 11:16:38 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" <freebsd@pdx.rh.CN85.dnsmgr.net> Message-Id: <201901111916.x0BJGcLG022599@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config In-Reply-To: <A5C8049C-DB95-4EBC-965E-A4DD399EF020@FreeBSD.org> To: Devin Teske <dteske@FreeBSD.org> Date: Fri, 11 Jan 2019 11:16:38 -0800 (PST) CC: rgrimes@FreeBSD.org, Warner Losh <imp@bsdimp.com>, Lars Engels <lme@FreeBSD.org>, src-committers <src-committers@FreeBSD.org>, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Reply-To: rgrimes@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 1352381856 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 11 Jan 2019 19:16:50 -0000 > > On Jan 11, 2019, at 10:36 AM, Rodney W. Grimes <freebsd@pdx.rh.CN85.dnsmgr.net> wrote: > > > >> On Fri, Jan 11, 2019 at 10:10 AM Rodney W. Grimes < > >> freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > >> > >>>> On Fri, Jan 11, 2019 at 08:04:33AM -0800, Rodney W. Grimes wrote: > >>>>> The style of this .sh does not match the normal style of > >>>>> such things in base, especially with respect to long lines > >>>>> and indentation. > >>>> > >>>> Do we have a style guide for shell scripts in base? How should > >>>> indentation look like? > >>> > >>> Not that I can locate, but I can state that almost all > >>> of the base code uses tab indenting and limited to 80 > >>> column widths, independent of c, sh, make, etc. > >>> > >> > >> We have a style.Makefile, style, style.mdoc and style.lua man pages. Maybe > >> it's time for style.sh, eh? > > > > Yes please! > > > > If we can agree to be professional and collegial, ... > > I'll start with chapters from the Style section of my book: > https://freebsdfrau.gitbooks.io/serious-shell-programming/content/style/awk.html > <https://freebsdfrau.gitbooks.io/serious-shell-programming/content/style/awk.html> If you can mdoc that and take what applies to /bin/sh. Might be easier to start with one of the other style.foo pages though. And we don't want to go to far and put all of our sh code out of conformance. For one variable being $foo or ${foo} is varied greatly, IMHO the rule should be that the file just be consistent through out, and that one or the other is the prefered style, but either is acceptable. -- Rod Grimes rgrimes@freebsd.org