Last active
January 9, 2022 10:59
-
-
Save viral32111/a6e72ec8305152e6577e36720c026419 to your computer and use it in GitHub Desktop.
Nano syntax highlighting for Dockerfiles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Slightly modified version of github.com/mbentley/Dockerfile.nanorc | |
| # Syntax highlighting for Dockerfiles | |
| syntax "Dockerfile" "[D|d]ockerfile[^/]*$" | |
| # Instructions | |
| icolor red "^(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD|ARG|STOPSIGNAL)[[:space:]]" | |
| # Brackets | |
| color brightgreen "(\(|\)|\[|\])" | |
| # Double Ampersand | |
| color brightmagenta "&&" | |
| # Comments | |
| icolor cyan "^[[:space:]]*#.*$" | |
| # Blank space at EOL | |
| color ,green "[[:space:]]+$" | |
| # Strings (single quote) | |
| color brightyellow "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!" | |
| # Strings (double quote) | |
| color brightyellow ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!" | |
| # Single and double quotes | |
| color brightyellow "('|\")" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment