Viewing Issue Simple Details
[ Jump to Notes ]
|
[ Issue History ]
[ Print ]
|
ID |
Category |
Severity |
Type |
Date Submitted |
Last Update |
0001588 |
[1003.1(2016/18)/Issue7+TC2] Shell and Utilities |
Comment |
Enhancement Request |
2022-06-18 17:42 |
2022-06-20 16:26 |
|
Reporter |
akbar |
View Status |
public |
|
Assigned To |
|
Priority |
normal |
Resolution |
Rejected |
|
Status |
Closed |
|
|
|
|
Name |
Akbar |
Organization |
|
User Reference |
|
Section |
2.7.4 Here-Document |
Page Number |
(page or range of pages) |
Line Number |
(Line or range of lines) |
Interp Status |
--- |
Final Accepted Text |
|
|
Summary |
0001588: Any arbitrary leading whitespace should be stripped before a here-doc delimiter |
Description |
In a world where there are two distinct styles of indentation (tabs vs. spaces) and where text editors can automatically expand or unexpand indents depending on one's preferences, the current standard is too restrictive regarding here-documents:
> If the redirection operator is "<<-", all leading <tab> characters shall be stripped from input lines and the line containing the trailing delimiter.
This forces a shell programmer to be extra mindful of their indents in a here-document. A tab person may even opt to ditch the indents altogether just to make sure the next maintainer doesn't accidentally expand them with spaces and risk breaking the whole script, while a space person won't be able to indent their here-documents at all, leaving them dissatisfied and potentially mad. |
Desired Action |
Therefore, to catch up with modern times, I suggest this restriction revised and eventually loosened to allow any arbitrary white space to appear before a here-document delimiter. |
Tags |
No tags attached. |
|
Attached Files |
|
|