Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14831

Re: Misbehavior with constants and bash script

Path csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From Quentin L'Hours <lhoursquentin@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: Misbehavior with constants and bash script
Date Mon, 19 Nov 2018 16:06:23 -0800
Lines 21
Approved bug-bash@gnu.org
Message-ID <mailman.4284.1542672394.1284.bug-bash@gnu.org> (permalink)
References <857e2280-38c5-344e-1916-17a6c6c61b02@netsystem.de> <342c7edc-d2e3-04ec-a094-24b6c9368b97@case.edu>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace usenet.stanford.edu 1542672395 31451 208.118.235.17 (20 Nov 2018 00:06:35 GMT)
X-Complaints-To action@cs.stanford.edu
To chet.ramey@case.edu, Alexander Reintzsch <Alexander.Reintzsch@netsystem.de>, "bug-bash@gnu.org" <bug-bash@gnu.org>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=m/X3VxAT+9DGK8fLOqgOxCpgKq/UbUwDolA+fm1hcQs=; b=qvn//b3NrktYB2kYfXyTDso8rHjIFI9uOwqTXab/z/kW/8YGa7xVB+s4JI9Qr/ONPi NPAO19mqg/veguIgpVXstcugbaDVPxlRPHECgbJqEO7jTQlVluZWOTj55hgcwAv1XQp/ F0A1TSLCbvGZC6HMQLwgWcOsw1Db4LhjujDyxANslX3FJW3iNllYzfTAPTOUJjlAaUTk AqKgFLHIH3qgZTC4QxjSHeUqz9Db2bfWWfbltUIUJYeHUejIIlAUIGwsu4Deav3jWZ8W vEzBUf2R9vUEdx+916xQrlS/F/Xa4bg5I7H90wf9SCwhPAz+DwJZtEBNznMpo03N8DY6 JgdQ==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=m/X3VxAT+9DGK8fLOqgOxCpgKq/UbUwDolA+fm1hcQs=; b=p+zIcwpt7aS4XX3WwsTTgYgV4oS/e9GRhjfK/rvKsZzwi+CY/cyfuQPXckrNSLwIII j7Dva6pP4YyQH6mX2XpydWus6zlGC3W8QFplVxBIDvEDrJDRSpnNkRRuLtHqQR/whzQ2 oGbbQnY52OheW5pgtM1RVMcGC/jOQ8kofOjnJq48M7ioAaofvo6AEoQCuzrghrakipH1 BsgQTy9iiE3k9fSdwx4JHkTWfx8yq+w8glh/PtxZREYVAEkPne8HhPAN3BjHGf5hRwdW GAH0kc3pOAJMHO0T4E9JbdKkQFtDuKfplT3hZep0pmkgMclSAlQ8krXDmzmVq7/5ebdl ca8w==
X-Gm-Message-State AGRZ1gIUO6hQXRnash8tVT78DlM5mlirriFuuYTntDVxoFrjs239qayE tYiluEaLv6xQx8KSOzaPJW0kBmzb
X-Google-Smtp-Source AJdET5eC2ip9O7vHWO9mkmVavI8zcznshg9xk5pSJPDTEQ9ZovUtxinK6RrC0DxDJKVo2H+HF5J05A==
X-Received by 2002:a63:ba48:: with SMTP id l8mr21750184pgu.72.1542672384992; Mon, 19 Nov 2018 16:06:24 -0800 (PST)
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
In-Reply-To <342c7edc-d2e3-04ec-a094-24b6c9368b97@case.edu>
Content-Language en-US
X-detected-operating-system by eggs.gnu.org: Genre and OS details not recognized.
X-Received-From 2607:f8b0:4864:20::431
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.21
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash/>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:14831

Show key headers only | View raw


Hi Chet,

On 2018-11-19 03:38 PM, Chet Ramey wrote:
 > When the assignment is used as an argument to `declare', it causes the
 > declare command to fail, but it's not a variable assignment error, so
 > the script simply continues as with any other failed command.

I remembered this email thread about declaration utilities splitting 
behavior:
https://lists.gnu.org/archive/html/help-bash/2018-01/msg00006.html

If declaration utilities splitting is modified to be similar to a basic 
assignment then wouldn't it make sense to do the same for the rest (in 
this case assigment errors)?

It feels like POSIX progressively wants declaration builtins to have the 
same rules as basic assignments, why should assignment error stay different?

-- 
Quentin

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Misbehavior with constants and bash script Quentin L'Hours <lhoursquentin@gmail.com> - 2018-11-19 16:06 -0800

csiph-web