Skip to content

Commit

Permalink
Enhanced shebang line highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
rkoeninger committed May 12, 2017
1 parent 88cb0f4 commit d9c9a1c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
8 changes: 6 additions & 2 deletions Shen.YAML-tmLanguage
Expand Up @@ -20,8 +20,12 @@ repository:
'0': {name: keyword.control}
end: ($)
patterns:
- name: support.variable
match: (.*)
- name: keyword.operator
match: (/)
- name: entity.name.function
match: (-[^\s/]+)
- name: entity.name.type
match: ([^\s/\-][^\s/]*)

expressions:
patterns:
Expand Down
16 changes: 14 additions & 2 deletions Shen.tmLanguage
Expand Up @@ -244,9 +244,21 @@
<array>
<dict>
<key>match</key>
<string>(.*)</string>
<string>(/)</string>
<key>name</key>
<string>support.variable</string>
<string>keyword.operator</string>
</dict>
<dict>
<key>match</key>
<string>(-[^\s/]+)</string>
<key>name</key>
<string>entity.name.function</string>
</dict>
<dict>
<key>match</key>
<string>([^\s/\-][^\s/]*)</string>
<key>name</key>
<string>entity.name.type</string>
</dict>
</array>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion example.shen
@@ -1,4 +1,4 @@
#!/bin/shebang
#!/bin/she bang -x

\\ single line comment

Expand Down

0 comments on commit d9c9a1c

Please sign in to comment.