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


Groups > gnu.bash.bug > #13784 > unrolled thread

Re: misleading error message from variable modifier

Started bydon fong <dfong@dfong.com>
First post2018-03-01 09:24 -0800
Last post2018-03-01 09:24 -0800
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: misleading error message from variable modifier don fong <dfong@dfong.com> - 2018-03-01 09:24 -0800

#13784 — Re: misleading error message from variable modifier

Fromdon fong <dfong@dfong.com>
Date2018-03-01 09:24 -0800
SubjectRe: misleading error message from variable modifier
Message-ID<mailman.9958.1519925075.27995.bug-bash@gnu.org>
any feedback on this patch?

On Sat, Feb 24, 2018 at 11:24 AM, Chet Ramey <chet.ramey@case.edu> 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/
>

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web