3 ms·
Speaking of the shell, Makefiles aren't the only place in Unix where tabs are significant. The sh Here-Document (aka heredoc) "<<-" operator strips leading tabs
by wahern 4y ago
Speaking of the shell, Makefiles aren't the only place in Unix where tabs are significant. The sh Here-Document (aka heredoc) "<<-" operator strips leading tabs, but not spaces, from a block of text.
I'm in the tabs for indentation camp, but even I was a little surprised by this, as I had always assumed the semantics were to match and strip whatever leading whitespace was found on the first line. When I emulate this feature in other languages (e.g. heredoc function in tandem with a language's multiline string quotation), that's the semantic I employ, even though in my own code that leading whitespace will invariably be all tabs.