dictu-lang / Dictu

Dictu is a high-level dynamically typed, multi-paradigm, interpreted programming language.
https://dictu-lang.com
MIT License
268 stars 53 forks source link

[FEATURE] Move history.txt #712

Closed Jason2605 closed 8 months ago

Jason2605 commented 9 months ago

Is there an existing issue for this?

Is your feature request related to a problem?

We probably want to move the history.txt that gets created to next to the installed interpreter location, this will 1) stop history.txt polluting every directory it enters and 2) allow history to be saved regardless of terminal location

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

briandowns commented 9 months ago

I've been giving this some thought for awhile now. What are your thoughts on creating a ${HOME}/.dictu directory and putting the history file there?

This directory also served as the location for user defined modules that the interpreter would load in imported, in a very old fork I have. I think this directory could be useful for any number of things.

Jason2605 commented 9 months ago

That sounds good to me yeah, good shout

briandowns commented 9 months ago

One more thought. The home dir can be default and maybe an ENV var to override it?

Jason2605 commented 9 months ago

I like it yeah, potentially DICTU_PATH?

briandowns commented 9 months ago

Sounds good to me!

briandowns commented 9 months ago

I'm happy to take this if you haven't started working on it yet.

Jason2605 commented 9 months ago

I haven't yet no, go for it!