From owner-svn-src-all@freebsd.org Fri Jan 11 20:36:28 2019 Return-Path: Delivered-To: svn-src-all@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 18AE4149C878 for ; Fri, 11 Jan 2019 20:36:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2BC58672A for ; Fri, 11 Jan 2019 20:36:27 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x833.google.com with SMTP id r14so20346861qtp.1 for ; Fri, 11 Jan 2019 12:36:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Qkf8eK4USkEPmovMXHLVCTtRw+TGrnEX8zbXn6oFcxM=; b=cxn4cKsWovjGGIebk+N93ZRzmig10wzKkzWXNqSfUY9Ck8AZRqtMJf1Y2ueabr58M1 cTB6guruLKMlO7xIpS0fHywNt4GXBaCwX3wPsajYslENDj9eMU/edlEFSk2WBKcaqX/6 FW+oxqmeIGhtXNGIqTMes3m8Qn4x/NUNj3qDUVDlTBZEg23ulMX54RB4DMQmknMHKUtm hXW5xR23/oKyWUZwT1fqHZQjbZGI/Xxm4CQ/71lXu71nOGMWP8ZS7IosopzGNknRMDRw /wslovG383OwC+PKMAVRRqA6waDhleNj5WWEgpWKMjdPuziptbPOAmsRyQpX5m3t9JLa Rg6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Qkf8eK4USkEPmovMXHLVCTtRw+TGrnEX8zbXn6oFcxM=; b=gtx5N1moVn5DcyOnmSIzWUCW+NAYiw3CLRWZxw5dDLmObIK2/8AQ+PRZN4vrAimcOE rQJ4Ybnv47hHg/Ht9vWaqVmeUzaE1qy/BwRZ4M4gPvYpNswfPLnXlkVUVgoaBee1FYKx qU/z3tqho7sBV8Xk9n56MCXt6ew4oQ6fqy6yE7DL86SaMY/Vj0uv+f5vwzlogQRGV7Uq 9dHtB4O+m2guUs/k8vdmJyBOvUT1yF3nv49uF+UNiA33Woj3THtnHJQUu9jPeyxYkBSq 6+NI4IxWTC/SMiuvXGWsp3ket/MLi27EKrBqV+bIB6c0xFhQQdhzdAffjzdGihRpBHl/ F+iQ== X-Gm-Message-State: AJcUukfw64L44yzXa77Dj1H5r3MpqL7qe/nYukj16fLxjGjXpAB/GThd eF5qoJcgeUh9W+zx5yVmbOGs9j5cKnUjTL28QGixiA== X-Google-Smtp-Source: ALg8bN4MCtbDAvG74HmPrDxWL1gpgk0wx0cpHvt9lHY0zShP5AKfyfHL7053KTADzoUlYgBQ0o62up1Jrqqye3rSjxk= X-Received: by 2002:a0c:bd15:: with SMTP id m21mr15343185qvg.57.1547238986999; Fri, 11 Jan 2019 12:36:26 -0800 (PST) MIME-Version: 1.0 References: <201901111916.x0BJGcLG022599@pdx.rh.CN85.dnsmgr.net> <12293ACC-4C9C-4BFB-A04B-85D43AFA0837@FreeBSD.org> In-Reply-To: <12293ACC-4C9C-4BFB-A04B-85D43AFA0837@FreeBSD.org> From: Warner Losh Date: Fri, 11 Jan 2019 13:36:15 -0700 Message-ID: Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config To: Devin Teske Cc: "Rodney W. Grimes" , Lars Engels , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: A2BC58672A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.986,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 20:36:28 -0000 On Fri, Jan 11, 2019, 1:12 PM Devin Teske > > > On Jan 11, 2019, at 11:16 AM, Rodney W. Grimes < > freebsd@pdx.rh.CN85.dnsmgr.net> wrote: > > > >>> 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 > > Surely. > > > > take what applies to /bin/sh. > > > > It *exclusively* applies to /bin/sh (as does my entire book). > > > > Might be easier to start with one of the other style.foo pages though. > > I already did. Started with style(9), going back to mdoc would be easy. > > > > And we don't want to go to far and put all of our sh code > > out of conformance. > > The Style entry in my book is based on my FreeBSD sh code. > > > > > 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. > > > > I talked about this at BSDCan in June. $foo is preferred (there > *is* a difference) and, as you say, if a file is consistently ${foo} > then it is fine. > I prefer {} because $foo:bar doesn't work while ${foo}:bar does. Warner >