New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Greek characters to list of acceptable prompt-symbols #85

Merged
merged 2 commits into from Oct 19, 2017

Conversation

Projects
None yet
2 participants
@Alhadis
Contributor

Alhadis commented Oct 19, 2017

Description of the Change

This PR enables Greek characters to be tokenised as prompt-string symbols in shell-session snippets:

λ echo $foo $bar
Foo
Bar
λ man apm
No manual entry for apm
λ man atom
No manual entry for atom.
Pathetic.
λ quit

As the above snippet illustrates, the lines beginning with λ aren't being scoped as command lines.

Compare with $:

$ echo $foo $bar
Foo
Bar
$ man apm

Note:
My shell's PS1 isn't an isolated case. Lambda calculus, functional programming, and probably Half-life have helped propagate spiffy-looking Greek things in any notation intended to look mathematical or programming-related.

Mocha's homepage features screenshots which also show λ in use.

Alternate Designs

I thought to include \p{S} in the pattern-block, which matches anything with a Unicode Symbol property.
The scope was too broad, and compatibility issues between Oniguruma and PCRE reared its ugly head.

Thankfully, both engines agree on the syntax for matching Unicode script-properties.

Benefits

Improved highlighting on GitHub. Specifically in README files, where example usage often takes the form of a terminal session's output.

Possible Drawbacks / Applicable Issues

None I can think of.

@Alhadis

This comment has been minimized.

Show comment
Hide comment
@Alhadis

Alhadis Oct 19, 2017

Contributor

/cc @50Wliu, because I know he loves SourcePawn and Half-Life and stuff. =)

Contributor

Alhadis commented Oct 19, 2017

/cc @50Wliu, because I know he loves SourcePawn and Half-Life and stuff. =)

Delete redundant `.coffeelintignore` file
Like every other grammar package, there never was a `spec/fixtures`.

Relevant:
* atom/language-gfm@181e691
* atom/language-javascript#464
* atom/language-todo@7d9c2bb
@50Wliu

This comment has been minimized.

Show comment
Hide comment
@50Wliu

50Wliu Oct 19, 2017

Member

Ha!

Member

50Wliu commented Oct 19, 2017

Ha!

@50Wliu 50Wliu merged commit 7fd865e into atom:master Oct 19, 2017

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@Alhadis Alhadis deleted the Cutlery-Drawer:prompt-symbols branch Oct 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment