-
Notifications
You must be signed in to change notification settings - Fork 74
Shellscript Syntax Highlighting never recognizes the end of a <<-EOF delimiter #72
Description
Prerequisites
- [X ] Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
As I'm sure you know, you can throw a bunch of text into a file by using something like:
cat > $1 << End-of-File
text here
more text
End-of-File
I'm presently doing just this in a script, inside a function and have indented whitespace:
cat > $1 << End-of-File
text here
more text
End-of-File
If you do this, you'll end up with the whitespace in your output file. However, you can ignore that whitespace by putting a dash (-) before your End-of-File delimiter. Example: cat > $1 <<-End-of-File
The issue is that when I include this dash, syntax highlighting for this script breaks from then on, because the language-shellscript interprets everything after <<-End-of-File
as text that is going into the file, which isn't correct.
Steps to Reproduce
- Copy this code into Atom and invoke the Shellscript Language package:
cat > $1 << End-of-File
text here
more text
End-of-File
- Insert a dash before End-of-File (or simply replace the first line with the following) and see the difference:
cat > $1 <<-End-of-File
Expected behavior: [What you expect to happen]
At the end of the file, I expect the rest of the script to revert to regular syntax highlighting.
Actual behavior: [What actually happens]
The Language package interprets the rest of the script as being a part of the cat statement.
Reproduces how often: [What percentage of the time does it reproduce?]
100%
Versions
Atom : 1.15.0
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0
apm 1.15.3
npm 3.10.5
node 4.4.5 x64
python
git 2.12.0.windows.1
visual studio
I am running Windows 10.
You can get this information from copy and pasting the output of atom --version
and apm --version
from the command line. Also, please include the OS and what version of the OS you're running.
Additional Information
I haven't checked whether this is happening in other operating systems.
Any additional information, configuration or data that might be necessary to reproduce the issue.