Open Niols opened 5 years ago
@yurug Do you think this is a bug in Morbig? Or a different interpretation of the standard?
Actually, in 2.4 Reserved Words, it is said:
Reserved words are words that have special meaning to the shell; see Shell Commands. The following words shall be recognized as reserved words:
! do esac in { done fi then } elif for until case else if while
This recognition shall only occur when none of the characters is quoted and when the word is used as:
- The first word of a command
- The first word following one of the reserved words other than case, for, or in
- […]
So this should, in my opinion, be a bug in Morbig and has actually nothing to do with "well separated" keywords (for which I can't find a reference anymore).
Let us have a look at:
refused by Morbig because of the
}
afterdone
but accepted by Dash and Bash. I wonder if being "well separated" works when the previous word is already a reserved word. After all, we never separate after a reserved word, it's only important before.