View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001588 | 1003.1(2016/18)/Issue7+TC2 | Shell and Utilities | public | 2022-06-18 17:42 | 2022-06-20 16:26 |
Reporter | akbar | Assigned To | |||
Priority | normal | Severity | Comment | Type | Enhancement Request |
Status | Closed | Resolution | Rejected | ||
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. |
|
There is nothing "modern" about the distinction between spaces and tabs, it has always existed. The difference is deliberate, and scripts all over the place will break if anything is changed in this area. Reject this please. |
|
Such change, if adopted, would possibly break countless of existing scripts. Needs to be rejected. (PS: Hadn't reloaded the tab and missed that kre had already commented the same) |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-06-18 17:42 | akbar | New Issue | |
2022-06-18 17:42 | akbar | Name | => Akbar |
2022-06-18 17:42 | akbar | Section | => 2.7.4 Here-Document |
2022-06-18 17:42 | akbar | Page Number | => (page or range of pages) |
2022-06-18 17:42 | akbar | Line Number | => (Line or range of lines) |
2022-06-18 22:36 | kre | Note Added: 0005852 | |
2022-06-18 22:46 | calestyo | Note Added: 0005853 | |
2022-06-18 22:46 | calestyo | Note Edited: 0005853 | |
2022-06-18 22:48 | calestyo | Note Edited: 0005853 | |
2022-06-20 16:26 | geoffclare | Interp Status | => --- |
2022-06-20 16:26 | geoffclare | Status | New => Closed |
2022-06-20 16:26 | geoffclare | Resolution | Open => Rejected |