Skip to content

Commit 47ae86b

Browse files
committed
Merge branch 'master' of github.com:Mathics3/mathicsscript
2 parents 3d66962 + fea6162 commit 47ae86b

File tree

6 files changed

+66
-33
lines changed

6 files changed

+66
-33
lines changed

mathicsscript/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,10 @@ def main(
220220
# Then, it can be changed by the settings file (in WL)
221221
# and overwritten by the command line parameter.
222222
definitions.set_ownvalue(
223-
"Settings`$ShowFullFormInput", from_python(1 if full_form else 0)
223+
"Settings`$ShowFullFormInput", from_python(True if full_form else False)
224224
)
225225
definitions.set_ownvalue(
226-
"Settings`$PygmentsShowTokens", from_python(1 if pygments_tokens else 0)
226+
"Settings`$PygmentsShowTokens", from_python(True if pygments_tokens else False)
227227
)
228228

229229
shell = TerminalShell(definitions, style, readline, completion, unicode)

mathicsscript/inputrc

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -38,30 +38,4 @@
3838
"\escx\e": "\\[ScriptX]"
3939
"\escy\e": "\\[ScriptY]"
4040
"\escz\e": "\\[ScriptZ]"
41-
"\escA\e": "\\[ScriptCapitalA]"
42-
"\escB\e": "\\[ScriptCapitalB]"
43-
"\escC\e": "\\[ScriptCapitalC]"
44-
"\escD\e": "\\[ScriptCapitalD]"
45-
"\escE\e": "\\[ScriptCapitalE]"
46-
"\escF\e": "\\[ScriptCapitalF]"
47-
"\escG\e": "\\[ScriptCapitalG]"
48-
"\escH\e": "\\[ScriptCapitalH]"
49-
"\escI\e": "\\[ScriptCapitalI]"
50-
"\escJ\e": "\\[ScriptCapitalJ]"
51-
"\escK\e": "\\[ScriptCapitalK]"
52-
"\escL\e": "\\[ScriptCapitalL]"
53-
"\escM\e": "\\[ScriptCapitalM]"
54-
"\escN\e": "\\[ScriptCapitalN]"
55-
"\escO\e": "\\[ScriptCapitalO]"
56-
"\escP\e": "\\[ScriptCapitalP]"
57-
"\escQ\e": "\\[ScriptCapitalQ]"
58-
"\escR\e": "\\[ScriptCapitalR]"
59-
"\escS\e": "\\[ScriptCapitalS]"
60-
"\escT\e": "\\[ScriptCapitalT]"
61-
"\escU\e": "\\[ScriptCapitalU]"
62-
"\escV\e": "\\[ScriptCapitalV]"
63-
"\escW\e": "\\[ScriptCapitalW]"
64-
"\escX\e": "\\[ScriptCapitalX]"
65-
"\esCy\e": "\\[ScriptCapitalY]"
66-
"\esCz\e": "\\[ScriptCapitalZ]"
6741
tab: complete

mathicsscript/inputrc-no-unicode

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,30 @@ $include "inputrc"
5454
# "\e\\phi\e": "φ" # ?
5555
# "\e\\chi\e": "χ" # ?
5656
# "\e\\psi\e": "ψ" # ?
57+
58+
"\escA\e": "\\[ScriptCapitalA]"
59+
"\escB\e": "\\[ScriptCapitalB]"
60+
"\escC\e": "\\[ScriptCapitalC]"
61+
"\escD\e": "\\[ScriptCapitalD]"
62+
"\escE\e": "\\[ScriptCapitalE]"
63+
"\escF\e": "\\[ScriptCapitalF]"
64+
"\escG\e": "\\[ScriptCapitalG]"
65+
"\escH\e": "\\[ScriptCapitalH]"
66+
"\escI\e": "\\[ScriptCapitalI]"
67+
"\escJ\e": "\\[ScriptCapitalJ]"
68+
"\escK\e": "\\[ScriptCapitalK]"
69+
"\escL\e": "\\[ScriptCapitalL]"
70+
"\escM\e": "\\[ScriptCapitalM]"
71+
"\escN\e": "\\[ScriptCapitalN]"
72+
"\escO\e": "\\[ScriptCapitalO]"
73+
"\escP\e": "\\[ScriptCapitalP]"
74+
"\escQ\e": "\\[ScriptCapitalQ]"
75+
"\escR\e": "\\[ScriptCapitalR]"
76+
"\escS\e": "\\[ScriptCapitalS]"
77+
"\escT\e": "\\[ScriptCapitalT]"
78+
"\escU\e": "\\[ScriptCapitalU]"
79+
"\escV\e": "\\[ScriptCapitalV]"
80+
"\escW\e": "\\[ScriptCapitalW]"
81+
"\escX\e": "\\[ScriptCapitalX]"
82+
"\esCy\e": "\\[ScriptCapitalY]"
83+
"\esCz\e": "\\[ScriptCapitalZ]"

mathicsscript/inputrc-unicode

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,30 @@ $include "inputrc"
152152
"\e&&\e": "∧"
153153
"\eue\e": "↔"
154154
"\ede\e": "→"
155+
156+
"\escA\e": "𝒜"
157+
"\escB\e": "ℬ"
158+
"\escC\e": "𝒞"
159+
"\escD\e": "𝒟"
160+
"\escE\e": "ℰ"
161+
"\escF\e": "ℱ"
162+
"\escG\e": "𝒢"
163+
"\escH\e": "ℋ"
164+
"\escI\e": "ℐ"
165+
"\escJ\e": "𝒥"
166+
"\escK\e": "𝒦"
167+
"\escL\e": "\\[ScriptCapitalL]"
168+
"\escM\e": "\\[ScriptCapitalM]"
169+
"\escN\e": "\\[ScriptCapitalN]"
170+
"\escO\e": "\\[ScriptCapitalO]"
171+
"\escP\e": "\\[ScriptCapitalP]"
172+
"\escQ\e": "\\[ScriptCapitalQ]"
173+
"\escR\e": "\\[ScriptCapitalR]"
174+
"\escS\e": "𝒮"
175+
"\escT\e": "\\[ScriptCapitalT]"
176+
"\escU\e": "\\[ScriptCapitalU]"
177+
"\escV\e": "\\[ScriptCapitalV]"
178+
"\escW\e": "\\[ScriptCapitalW]"
179+
"\escX\e": "\\[ScriptCapitalX]"
180+
"\esCy\e": "\\[ScriptCapitalY]"
181+
"\esCz\e": "\\[ScriptCapitalZ]"

mathicsscript/settings.m

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,19 @@
77
(**********************************************************************)
88

99

10-
Settings`$ShowFullFormInput::usage = "If this variable is set nonzero, mathicsscript shows the input in FullForm before evaluation.
10+
Settings`$ShowFullFormInput::usage = "If this Boolean variable is set True, mathicsscript shows the input in FullForm before evaluation.
1111
1212
Note this is for input entered, not the output of the evaluated result.
1313
"
1414

1515
Settings`$ShowFullFormInput = False
16-
Settings`$PygmentsStyle::usage = "This sets the Pygments style used to colorize output. The value should be a string.
16+
Settings`$PygmentsStyle::usage = "This variable sets the Pygments style used to colorize output. The value should be a string.
1717
1818
The default value changes background depending on whether the terminal has a light or dark background. You can also set the color style used on the command with the ``--style`` option, or look at the variable ```Settings`PygmentsStylesAvailable```. Or it can be set in the settings.m file."
1919

20-
Settings`$PygmentsShowTokens::usage = "Setting this True will show Pygments tokenization of the output."
21-
Settings`$UseUnicode::usage = "Setting this False wil1 avoid unicode in output. The default is to use Unicode."
20+
Settings`$PygmentsShowTokens::usage = "Setting this variable True will show Pygments tokenization of the output."
21+
22+
Settings`$PygmentsShowTokens = False
23+
24+
Settings`$PygmentsStyle::usage = "This Boolean variable sets whether Unicode is used in terminal input and output."
25+
Settings`$UseUnicode = True

mathicsscript/termshell.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
from term_background import is_dark_background
4848

4949
from readline import (
50+
parse_and_bind,
5051
read_history_file,
5152
read_init_file,
5253
set_completer,
@@ -155,7 +156,7 @@ def __init__(
155156
)
156157
read_init_file(str(parent_dir / inputrc))
157158

158-
# parse_and_bind("tab: complete")
159+
parse_and_bind("tab: complete")
159160
self.completion_candidates = []
160161

161162
# History

0 commit comments

Comments
 (0)