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


Groups > gnu.bash.bug > #14196

Clarify cases of implicit and explicit line continuation

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Shriramana Sharma <samjnaa@gmail.com>
Newsgroups gnu.bash.bug
Subject Clarify cases of implicit and explicit line continuation
Date Fri, 1 Jun 2018 10:58:29 +0530
Lines 34
Approved bug-bash@gnu.org
Message-ID <mailman.912.1527839017.1292.bug-bash@gnu.org> (permalink)
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 1527839018 3226 208.118.235.17 (1 Jun 2018 07:43:38 GMT)
X-Complaints-To action@cs.stanford.edu
To 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=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=E7eRy5VCOSsRf3y7DwCH7iswQsN3wXAbknR5MZwsNa4=; b=otpP5U3QKDADv1qNtAlyvNeDgVsF3d8ikre2TZuC/Wvn0LVVb3/uEnxJ9FHlP9LhZ4 /J9lu1n+4TUMFngYg9H0z79PfmMg7hbatxB6N1Z8if8MZ7jZyKHMQ3vlqmh/ezK+v3Ey 9rS/TCwzb6idpBGcVFpsMwbr6X64PuS0CKQS78sltpviQezI+eQJQNHN6XE2dspFSDc5 Grrd9NibDxPfmjFP5GqMp70M05Bk2BoeP5I8O9Q7AWspk1ph9w9ZHWE8iPnffQyeHM8B Kl03NnkMd3PcwLFRwWMJ34S+JTwkhY9oqTRfXGyCx973eNTdIMvKL2kawncAfdu6Fz+7 nC2Q==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=E7eRy5VCOSsRf3y7DwCH7iswQsN3wXAbknR5MZwsNa4=; b=LoFeUh4X/RUCmyCKsWu320AbX865WLaPalPZQ1CMtTLUAHUIF3B+esJxEiUwI57/EG /UPZelw1VW131Qz9QjYN6Dpzn1sRNilro1rOrm2WBzTN5maHvpD2qsc3E+aJBEYRSuhN WoI2rRgY4urxNup7nim0CER4hcatAXsMENeED7Yneglv+p7BtrQyMCzVpQtEMxnJpofe pnv54BP2W34GoJWKG0ymTYCBCMPero5xkTXV7iiGDWB9gxAI3+0xlLzsEgWN//dX8PMi VAVilbde1FAncxxt70NqFUVBDyn8T/K22Nl2vgmbztcuETvcd2FEFd8gBYKm0v9VkYsp 6hOA==
X-Gm-Message-State ALKqPwcn9+ovAcLvXu+LubL3oqyKf0wE1HlYV9eRAQI+JgeDpt+3Ydl4 pSr+wrb5VHn6d8FIWIKxKxDoVJh7c2iex49547s=
X-Google-Smtp-Source ADUXVKKQdK3Pp+AKJeGsFnHTeC+s/+c70en0kGszlzLEdkVzb4cA2N8JkkudVgGVOrhV6Q9eDSsI0ZmhlpD5gvxO5wA=
X-Received by 2002:a25:e750:: with SMTP id e77-v6mr5508128ybh.492.1527830910498; Thu, 31 May 2018 22:28:30 -0700 (PDT)
X-detected-operating-system by eggs.gnu.org: Genre and OS details not recognized.
X-Received-From 2607:f8b0:4002:c09::22f
X-Mailman-Approved-At Fri, 01 Jun 2018 03:43:37 -0400
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:14196

Show key headers only | View raw


Hello. See https://unix.stackexchange.com/questions/253518/where-are-bash-line-continuations-after-and-documented.

Roughly put, wherever lines terminating with a particular token are
syntactically valid, they are taken as complete, and an explicit \ is
required to continue the line, but lines ending with && || or I and
lines where an array definition has been started with =( but not
closed with a ) implicitly continue to the next physical line. This is
not documented under the manual section describing explicit line
joining/continuation:

https://www.gnu.org/software/bash/manual/html_node/Escape-Character.html#Escape-Character

but the similar specification for Python is properly and clearly
documented in the Python docs:

https://docs.python.org/3/reference/lexical_analysis.html#explicit-line-joining

The StackExchange conversation mention of "In POSIX, it's specified
via the grammar rules" seems to indicate that though this behaviour is
not documented, it is the expected behaviour as per POSIX.

Thus I request that the Bash docs clearly document this behaviour.

-- 
Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा 𑀰𑁆𑀭𑀻𑀭𑀫𑀡𑀰𑀭𑁆𑀫𑀸

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


Thread

Clarify cases of implicit and explicit line continuation Shriramana Sharma <samjnaa@gmail.com> - 2018-06-01 10:58 +0530

csiph-web