Syntax highlighting is one thing. The double quotes another. Each editor has its own dis-/advantages in this manner. See my question on [SoftwareRecs][1] and its respective answers, most importantly [this for both CLI and GUI][2] and [this for GUI][3]. Notably, [Visual Studio Code][4], has **IMHO** the best Syntax highlighting from GUI editors. From CLI editors, refer to the answer of `gVim`, which does the same syntax highlighting job for CLI. Note that as I was a heavy `nano` user, I can tell you `nano` can't distinguish the variables inside quotes. Finally, what should trouble you most is that you did not use - I suppose you're not used to it - bad habit - the double quotes. Please refer to StackOverflow for more information or simply use google. ----------------- PS: Always pipe your scripts to [ShellCheck][5] ;) [1]: https://softwarerecs.stackexchange.com/q/50895/33363 [2]: https://softwarerecs.stackexchange.com/a/50900/33363 [3]: https://softwarerecs.stackexchange.com/a/50898/33363 [4]: https://code.visualstudio.com/ [5]: https://www.shellcheck.net/