From nobody Tue Oct 26 15:40:54 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6F6AD1812A6A; Tue, 26 Oct 2021 15:41:04 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hdwym1zvGz4jll; Tue, 26 Oct 2021 15:41:04 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTP id fNMTmGwXdczbLfOZOmFtuX; Tue, 26 Oct 2021 15:40:58 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id fOZMm63FfgxGifOZNmMH7l; Tue, 26 Oct 2021 15:40:58 +0000 X-Authority-Analysis: v=2.4 cv=SqLzVNC0 c=1 sm=1 tr=0 ts=6178218a a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=8nJEP1OIZ-IA:10 a=8gfv0ekSlNoA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=YsaGJC6E6cbuPZDk6JEA:9 a=wPNLvfGTeEIA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 27C97235; Tue, 26 Oct 2021 08:40:54 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 19QFesnX010998; Tue, 26 Oct 2021 08:40:54 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202110261540.19QFesnX010998@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ian Lepore cc: Ka Ho Ng , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: fcfa64801a4f - main - sh: Set PATH envvar after setting HOME in dotfile In-reply-to: <57f6f877de121954935225fba9874a39b6b768c4.camel@freebsd.org> References: <202110261450.19QEoMqo020433@gitrepo.freebsd.org> <57f6f877de121954935225fba9874a39b6b768c4.camel@freebsd.org> Comments: In-reply-to Ian Lepore message dated "Tue, 26 Oct 2021 09:32:08 -0600." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Tue, 26 Oct 2021 08:40:54 -0700 X-CMAE-Envelope: MS4xfFFkl28w9kA0LCDIT6qctugGNREApuFoXq2GA8GVKAI7u4VBlVF6CIHNdsPXnOKEFPr7nzeuzyz6Xx6ki6h1jpb9pbqUO4rW6v+dBMDH8slTyE/Fi8Z9 P0v+nH7oKlCP9HYhnkdO3swIn5lTNLcdWHDOCgWWhDyF8gYqbLGQCrdYIDYNat0PZYzZmhoMsqHWsoE/MwHTwLzfN/z+hjRXhg1EfvSqXYg6wI6HXngOVL5J JceVpbUk7KPRh9esZC198szdpk7xaEwZBUpjw1Ml7VoDMk89ARAH3uwriQx19Fa/vMxQ9W3xnxVDBvNdM4gfZZGGVupZDi34r/8jtlyvmYzKw1BLvHJNFSBV K/JfwC2I X-Rspamd-Queue-Id: 4Hdwym1zvGz4jll X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N In message <57f6f877de121954935225fba9874a39b6b768c4.camel@freebsd.org>, Ian Le pore writes: > On Tue, 2021-10-26 at 14:50 +0000, Ka Ho Ng wrote: > > The branch main has been updated by khng: > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=fcfa64801a4fe836ff481465ea068e791aa > 4ce6a > > > > commit fcfa64801a4fe836ff481465ea068e791aa4ce6a > > Author:     Ka Ho Ng > > AuthorDate: 2021-10-26 14:48:57 +0000 > > Commit:     Ka Ho Ng > > CommitDate: 2021-10-26 14:50:09 +0000 > > > >     sh: Set PATH envvar after setting HOME in dotfile > >     > >     In single-user mode, all env vars are absent, so exptilde() would > > not be > >     able to expand ~ correctly. > >     Place the lines setting PATH below HOME, so exptilde() would work > > as > >     expected. > >     > >     Sponsored by:   The FreeBSD Foundation > >     MFC after:      3 days > >     Reviewed by:    jilles, emaste > >     Differential Revision:  https://reviews.freebsd.org/D27003 > > --- > >  bin/sh/dot.profile | 4 ++-- > >  1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/bin/sh/dot.profile b/bin/sh/dot.profile > > index fd0c43fdb927..e296a360bcc7 100644 > > --- a/bin/sh/dot.profile > > +++ b/bin/sh/dot.profile > > @@ -1,9 +1,9 @@ > >  # $FreeBSD$ > >  # > > - > > PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bi > > n > > -export PATH > >  HOME=/root > >  export HOME > > +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/ > > bin > > +export PATH > >  TERM=${TERM:-xterm} > >  export TERM > >  PAGER=less > > I've always been curious whether there's a reason we seem to favor > > VAR=value > export VAR > > over the more compact form > > export VAR=value Older Bourne shells don't support export VAR=value. This gives the user greater flexibility to choose an older shell as their login shell. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few.