Path: csiph.com!weretis.net!feeder6.news.weretis.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!171.64.64.130.MISMATCH!usenet.stanford.edu!not-for-mail From: don fong Newsgroups: gnu.bash.bug Subject: Re: misleading error message from variable modifier Date: Thu, 1 Mar 2018 09:24:29 -0800 Lines: 26 Sender: dfong@dfong.org Approved: bug-bash@gnu.org Message-ID: References: <268f06ff-55ee-4364-fa75-54081dc7869a@case.edu> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: usenet.stanford.edu 1519925075 14441 208.118.235.17 (1 Mar 2018 17:24:35 GMT) X-Complaints-To: action@cs.stanford.edu Cc: "bash.bug list" To: Chester Ramey Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfong-org.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=0ac20h0VtPkgXkzPc624oKenpb9qaQcrnCHghIHeAHs=; b=P6AlCLo1dpVnbbdzkuBzMpaD8TEU52urF45AcPJk2gDg7nSPFSv2mve1ZrV6n477K3 FykWoutQm2eleHLVam1dXZt+2fkrW+9dDmEguSx8S6QmDlo+q/VyUqKSD1YalLlmfN0J kztWpaUnH2U8lsCJeGX50kUjjq97X23GO3MsFtcPZU2jYchVsUtQJacisPh7/6QCN+Xn VIHJfBpUCJqifU7LxfF5t1A+ABfkaLRV0Ewgxa7qppV+lMPXMcqSOCXO/5v+Ges8kBxU G2w92M8mKcx9+YU95Rakp50DM5NyO0J/RXQBzCbD176JZJH7Nb5SUbhCG3O4RbVWAqZ7 6mDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=0ac20h0VtPkgXkzPc624oKenpb9qaQcrnCHghIHeAHs=; b=F+Y/HceRSkgBwZwGtg65DRtbh2Ml+ot/7+9jt3U92t/uwYMVpn/B4m99OXs6MZjTt/ AlAc9I+Bs8x1JwQCcULMtaMFwf5C2C0kaqsFyoDHloGJN84ndTq1EeO8nbH2uFjR7fyA bqo9BBK12I8CYHYhbadBsBZBpSYvcWDwyu1uLBBm7ga6+S2xbRFQKbp6rq2AQMuneNE2 iDlUYZX4kLqOamAsqZYz22nGzU9Fvqm9EwXbDSFHI1jiWbapHXPcsq/WUT47MsUXPj+L fA1NRFb73KBKa8zYyqXeRIsKCQ7hnY0uw2EYk/ZqeG+plezzTW/tcMufjeq0MxFdVo8P 0mqg== X-Gm-Message-State: AElRT7EUDVgqZ6MFdIkEIhn7bC/2bzmbNdWVaqPdOgnus6BoyBWDgndX p+I0R6vqLLBRkZoR++NPSAsHPQ4zwr9Gd7eYv9YF8w== X-Google-Smtp-Source: AG47ELvajHNKBiL+2PhEU1aq/9IhDtAkZDUzt9RZSykx5UMtG686PayOyv6iG0Pg6Q/XazJAVNLMCXRXaMfRAAAzMAk= X-Received: by 10.55.41.92 with SMTP id p89mr3909753qkh.208.1519925069892; Thu, 01 Mar 2018 09:24:29 -0800 (PST) X-Originating-IP: [2600:1700:cd00:dfb0:8487:1227:99a5:87e5] In-Reply-To: <268f06ff-55ee-4364-fa75-54081dc7869a@case.edu> X-Google-Sender-Auth: LJmNJ2qFBnenbk82k6l7yeWHvUM X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::231 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:13784 any feedback on this patch? On Sat, Feb 24, 2018 at 11:24 AM, Chet Ramey wrote: > On 2/23/18 10:20 PM, don fong wrote: > > hi folks. i'm a bash user, who just noticed a slight anomaly. it has > > to with the shell variable modifier ${parameter?} . according to the > > man page, ${X?} should yield an error message and exit if X is unset, > > otherwise the value of X. in this case, > > > > unset X; echo ${X?} > > > > i expect to get an error message, and indeed an error message results. > > > > bash: X: parameter null or not set > > > > but i think the error message is misleading. > > Thanks for the report and patch. I'll take a look. > > Chet > -- > ``The lyf so short, the craft so long to lerne.'' - Chaucer > ``Ars longa, vita brevis'' - Hippocrates > Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/ >