Closed
Conversation
__main__.py, termshell.py: import mathics_scanner inputrc-no-unicode: remove translations that aren't surrounded in escape
rocky
commented
Jan 23, 2021
| "\e\\omega\e": "\\[Omega]" | ||
|
|
||
| # Autogenerated from https://github.com/Mathics3/mathics-development-guide/blob/master/resources/named-characters-data.csv | ||
| "a'": "\\[AAcute]" |
Member
Author
There was a problem hiding this comment.
@GarkGarcia All of these characters should be regenerated. They are missing the escape at the beginning and end of the escape sequence.
For example "\ea'\e" rather than "a'".
Contributor
There was a problem hiding this comment.
Ohh, yes, forgot about that. @rocky btw we could use mathics-scanner to proceduraly generate the inputrc files now. It would look something like the following:
from mathics_scanner.characters import replace_wl_with_plain_text, aliased_characters
# Print inputrc with unicode
for alias in alieased_characters:
print(f'"\\e{escape(alias)}\\e": "{escape(replace_wl_with_plain_text(aliased_characters[alias]))}"')
# Print inputrc without unicode
for alias in alieased_characters:
print(f'"\\e{escape(alias)}\\e": "{escape(replace_wl_with_plain_text(aliased_characters[alias], use_unicode=False))}"')
Contributor
There was a problem hiding this comment.
Great! Make it so!
Ok, I just need to know which characters should be escaped inside of a inputrc string.
a306cd6 to
f87c10f
Compare
920636e to
5b17b72
Compare
Member
Author
|
Superceded by #17 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
main.py, termshell.py: import mathics_scanner
inputrc-no-unicode: remove translations that aren't surrounded in escape