Austin Group Defect Tracker

Aardvark Mark IV

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

- Relationships

-  Notes
kre (reporter)
2022-06-18 22:36

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.
calestyo (reporter)
2022-06-18 22:46
edited on: 2022-06-18 22:48

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)

- Issue History
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

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker