Skip to content
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

history.txt file is written to current directory #16

Closed
wezm opened this issue Jun 23, 2019 · 5 comments
Closed

history.txt file is written to current directory #16

wezm opened this issue Jun 23, 2019 · 5 comments

Comments

@wezm
Copy link

wezm commented Jun 23, 2019

Whenever eva is run it writes a history.txt into the current directory. This results in a lot of these files lying around my system. I would prefer if eva used a central history file stored in the appropriate place on the given operating system (The directories crate can help with that).

@oppiliappan
Copy link
Owner

I have used the dirs crate, and now history is stored in the home directory. back when rustyline was in version 3.x, it was not possible to save to a path!

if you have any suggestions regarding the location for the history file, let me know!

thank you for your contributions.

@wezm
Copy link
Author

wezm commented Jun 23, 2019

Great, thanks for the quick fix!

if you have any suggestions regarding the location for the history file, let me know!

I don't think the home directory is the right place for the history. Reading the XDG Base Directory Specification I would suggest using XDG_DATA_HOME, which corresponds to data_dir in directories.

@oppiliappan
Copy link
Owner

TIL about data home. i will make the suggested changes when I get back home!

@oppiliappan oppiliappan reopened this Jun 24, 2019
@oppiliappan
Copy link
Owner

done! i havent tested too much, but it seems to be working fine!

@wezm
Copy link
Author

wezm commented Jun 25, 2019

Seems to work great!

@wezm wezm mentioned this issue Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants