Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Robert Elz Newsgroups: gnu.bash.bug Subject: Re: Assignment-like word shouldn't be subjected to tilde expansion in POSIX mode Date: Mon, 20 Jul 2020 15:28:33 +0700 Lines: 25 Approved: bug-bash@gnu.org Message-ID: References: <5f066ef0-1fed-ad5b-d564-490268d32427@case.edu> <8ddc4816-f85e-97b3-5c51-9b55acdcaca5@case.edu> <26757.1595233713@jinx.noi.kre.to> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: usenet.stanford.edu 1595233747 17364 209.51.188.17 (20 Jul 2020 08:29:07 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash@gnu.org To: chet.ramey@case.edu Envelope-to: bug-bash@gnu.org In-Reply-To: <5f066ef0-1fed-ad5b-d564-490268d32427@case.edu> Received-SPF: permerror client-ip=2001:3c8:9009:181::2; envelope-from=kre@munnari.OZ.AU; helo=munnari.OZ.AU X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, KHOP_HELO_FCRDNS=1, T_SPF_HELO_PERMERROR=0.01, T_SPF_PERMERROR=0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <26757.1595233713@jinx.noi.kre.to> X-Mailman-Original-References: <5f066ef0-1fed-ad5b-d564-490268d32427@case.edu> <8ddc4816-f85e-97b3-5c51-9b55acdcaca5@case.edu> Xref: csiph.com gnu.bash.bug:16587 Date: Sun, 19 Jul 2020 15:21:07 -0400 From: Chet Ramey Message-ID: <5f066ef0-1fed-ad5b-d564-490268d32427=40case.edu> =7C Maybe, but Posix says this isn't a variable assignment context, as = POSIX =7C defines variable assignments, and technically the shell shouldn't = perform =7C tilde expansions after =60=3D' or =60:' at all. You could argue tha= t bash has a =7C bug here in that it expands the tilde after the =60=3D'. It may also be that this is a bug in POSIX, as all ksh shells seem to act the way that bash does, expanding the first =7E but not the secpod. Most other shells expand neither, except the NetBSD shell which treats this as a var assignment (which it is really, however explained away in POSIX) and expands both. It is likely that if someone were to file a posix bug report about this, it would turn into =22unspecified=22 whether =7E expansion is done in tha= t context. kre