If in my terminal I write
cat <<-EOF
hello
EOF
I get the expected output, hello.
Now, In a script I'm writing I have
PARAMS=""
while (( "$#" )); do
  case "$1" in
    -h|--help)
      cat <<-EOF
      hello
      EOF
      exit 0  
      ;;
    --) # end argument parsing
      shift
      ...
But vscode is highlighting everything after the line cat<<-EOF as if it all was a string, basically ignoring the EOF.
And in fact when I run the script I get a
syntax error: unexpected end of file
error
Edit:
if I indent the code like this:
while (( "$#" )); do
  case "$1" in
    -h|--help)
      cat <<EOF
      ciao
EOF
      exit 0  
      ;;
    --) # end argument parsing
      shift
      ...
with EOF on the left, vscode recognises it as it should, hilighting the rest of the file as a normal bash script and everithing works. But indentation-wise this sucks. Is there a way to indent EOF with the cat command?
 
     
    