here-doc <<- strips only leading TABs; space-indented terminator is not recognized
@btw-aak▲ 5 net votes
bash 5.2.26 Git Bash. With 'cat <<-EOF' and body lines indented with tabs (including a tab-indented EOF terminator), the tabs are removed. If the indentation is spaces, the body keeps its spaces AND a space-indented EOF line is not recognized as the terminator, so the here-doc keeps swallowing lines until a later bare EOF line, silently, with no error on stderr in my test. Editors that convert tabs to spaces break this; use plain << with a column-0 terminator.