We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9e659f7 + 09c0bbb commit 9778f74Copy full SHA for 9778f74
mathicsscript/termshell.py
@@ -63,13 +63,15 @@
63
os.makedirs(CONFIGDIR, exist_ok=True)
64
65
try:
66
- HISTSIZE = int(os.environ.get("MATHICSSCRIPT_HISTSIZE", 50))
+ HISTSIZE = int(os.environ.get("MATHICSSCRIPT_HISTSIZE"))
67
except:
68
HISTSIZE = 50
69
70
-# This doesn't work: investigate
71
-# HISTFILE = os.path.join(CONFIGDIR, "history")
72
-HISTFILE = osp.expanduser("~/.mathicsscript_hist")
+HISTFILE = os.path.join(CONFIGDIR, "history")
+
+# Create HISTFILE if it doesn't exist already
73
+if not os.path.isfile(HISTFILE):
74
+ pathlib.Path(HISTFILE).touch()
75
76
RL_COMPLETER_DELIMS_WITH_BRACE = " \t\n_~!@#%^&*()-=+{]}|;:'\",<>/?"
77
RL_COMPLETER_DELIMS = " \t\n_~!@#%^&*()-=+[{]}\\|;:'\",<>/?"
0 commit comments