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


Groups > gnu.bash.bug > #14577

Re: error message for missing fi is not helpful

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: error message for missing fi is not helpful
Date Thu, 13 Sep 2018 16:21:21 -0400
Organization ITS, Case Western Reserve University
Lines 34
Approved bug-bash@gnu.org
Message-ID <mailman.747.1536870125.1284.bug-bash@gnu.org> (permalink)
References <12006574-8df4-d613-0603-51b77b703a3d@dwd.de> <3461cc07-6477-234b-83ea-30a6bc0c8d8c@case.edu> <5B99CB6D.5060108@tlinx.org>
Reply-To chet.ramey@case.edu
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
X-Trace usenet.stanford.edu 1536870126 6674 208.118.235.17 (13 Sep 2018 20:22:06 GMT)
X-Complaints-To action@cs.stanford.edu
Cc chet.ramey@case.edu, Manuel Reiter <manuel.reiter@dwd.de>, bug-bash@gnu.org
To L A Walsh <bash@tlinx.org>
Envelope-to bug-bash@gnu.org
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:cc:subject:to:references:from :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=cbiq973gw0Nag0ouQmLk/7W7eEjXSDyaNIp8nkpFYBQ=; b=Wl/XGLQ/9fdZPnPFcFZiowDEkB22v3ojij52Njkt00f74USd04A1q8NHKH4w0VSwG7 R/z+g/QMvHx8Zqd1CzLXxUMU93Yf2A7zFE22EcvlESLHmpDfqBdeOLswJV4CF+tex1uc /jfR5oJ6WJAemT80HHhwBrN3WFydMG8qta6mTcJd2eKbNnm6nsYVc3MSih5BBQS8caU1 n+wBpDzkTR2iPFnaUEKL5G1MAAy3jiUW1y7V2T84m5Zf12M4IoQsK7+luFkr0p/qUIBw 1CjWA14OzUJ0yOko57TuuMrcNzF3EktoHIKFA1AUC0E/9OPGN0qx/D6HiMMyegeXJglM hlHw==
X-Gm-Message-State APzg51DuTIo6WcUZ5eZwFBsoNeiLDo/cpj1fx/MoFXStRxIFlv43IfNJ dGt7OEDnDO+o5i0uruecRsdo3hbu7Ue67XMBMrKdzexyZjNyLQEuxhORddKSF18ElTZj8kwtsey HWXwyQeVEf2I=
X-Received by 2002:a6b:dd18:: with SMTP id f24-v6mr7651862ioc.114.1536870087115; Thu, 13 Sep 2018 13:21:27 -0700 (PDT)
X-Google-Smtp-Source ANB0Vdb5p5u/A3d7aq85Vy7CrBTtjABGliu7J9b4JEvWwQpzpWjaOi3lXHWXtsrYaWM+qiiUqN/Qag==
X-Received by 2002:a6b:dd18:: with SMTP id f24-v6mr7651836ioc.114.1536870086805; Thu, 13 Sep 2018 13:21:26 -0700 (PDT)
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
In-Reply-To <5B99CB6D.5060108@tlinx.org>
Content-Language en-US
X-Junkmail-Status score=8/90, host=mpv1-2015.case.edu
X-Junkmail-PrAS-Raw score=8/90, refid=2.7.2:2018.9.13.191815:17:8.317, ip=, rules=__YOUTUBE_RCVD, __X_GOOGLE_DKIM_SIGNATURE, __HAS_REPLYTO, __HAS_CC_HDR, __MULTIPLE_RCPTS_CC_X2, __CC_NAME, __CC_NAME_DIFF_FROM_ACC, __PHISH_SPEAR_SUBJ_SUBJECT, __SUBJ_REPLY, __PHISH_SPEAR_SUBJ_ALERT, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __SUBJ_ALPHA_END, __TO_MALFORMED_2, __TO_NAME, __TO_NAME_DIFF_FROM_ACC, __REFERENCES, __HAS_FROM, FROM_EDU_TLD, __HAS_MSGID, __SANE_MSGID, DATE_TZ_NA, __USER_AGENT, __MOZILLA_USER_AGENT, __MIME_VERSION, __IN_REP_TO, __CT, __CT_TEXT_PLAIN, __CTE, __REPLYTO_SAMEAS_FROM_ADDY, __REPLYTO_SAMEAS_FROM_ACC, __FROM_DOMAIN_IN_ANY_CC2, __REPLYTO_SAMEAS_FROM_DOMAIN, __ANY_URI, __URI_WITH_PATH, __URI_NO_WWW, __HIGHBITS, __CP_URI_IN_BODY, __SUBJ_ALPHA_NEGATE, __URI_IN_BODY, __URI_NOT_IMG, __FORWARDED_MSG, __NO_HTML_TAG_RAW, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_1000_1099, __MIME_TEXT_P1, __MIME_TEXT_ONLY, __URI_NS, [TRUNCATED], so=2010-03-03 19:42:08, dmn=2016-08-03-0138
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From 129.22.103.226
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:14577

Show key headers only | View raw


On 9/12/18 10:29 PM, L A Walsh wrote:

> I can't speak for formatting or base-specific function usage, but I don't
> think there was any of those.
> 
> Anyway, if you store the word in a separate array where the line #
> is stored, you _could_ list the matching word, but I suspect just the
> line it started on would be enough for most users.
> 
> --- (eoftest.sh)
> #!/bin/bash
> 
> if ((1)); then
>    for i in 1 2 3; do
> 
> 
> 
>        echo wow
> 
> ---
>>  ./bash eoftest.sh                          
> eoftest.sh: line 10: syntax error: unexpected end of file from line 4.
> 
> The wording was just what I threw in.  I don't _need_ attribution for
> this if that makes it easier.

I'm sure you noticed that word_lineno isn't set for every compound command
and that it's limited.

-- 
``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/

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


Thread

Re: error message for missing fi is not helpful Chet Ramey <chet.ramey@case.edu> - 2018-09-13 16:21 -0400

csiph-web