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


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

Clarify cases of implicit and explicit line continuation

Started byShriramana Sharma <samjnaa@gmail.com>
First post2018-06-01 10:58 +0530
Last post2018-06-01 10:58 +0530
Articles 1 — 1 participant

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


Contents

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

#14196 — Clarify cases of implicit and explicit line continuation

FromShriramana Sharma <samjnaa@gmail.com>
Date2018-06-01 10:58 +0530
SubjectClarify cases of implicit and explicit line continuation
Message-ID<mailman.912.1527839017.1292.bug-bash@gnu.org>
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 ஶ்ரீரமணஶர்மா श्रीरमणशर्मा 𑀰𑁆𑀭𑀻𑀭𑀫𑀡𑀰𑀭𑁆𑀫𑀸

[toc] | [standalone]


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


csiph-web