cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.89k stars 178 forks source link

Make McFly history.db path configurable #243

Open praveenperera opened 2 years ago

praveenperera commented 2 years ago

Hey @cantino would you accept a PR to make the Settings::storage_dir_path() configurable with an ENV var?

cantino commented 2 years ago

Yup!

cantino commented 2 years ago

Actually https://github.com/cantino/mcfly/pull/124 does this, but I've been dragging my feet since ~/.mcfly seems like a good default to me.

cantino commented 2 years ago

But I'd definitely be fine with making it configurable.

praveenperera commented 2 years ago

Ya I like ~/.mcfly as a default. But having it overridable if the env var exists.

How about $MCFLY_DB_DIR

cantino commented 2 years ago

@praveenperera I think I'm going to accept https://github.com/cantino/mcfly/pull/124, given the community pressure. Any thoughts?

praveenperera commented 2 years ago

@cantino ya that sounds reasonable. Sorry I haven't been able to look at the PRs yet. But I'm assuming it's only changing the default if .mcfly dir doesn't already exist?

Personally though I've never liked having files in ~/Library/Application Support/ just seems harder to access. I always wondered why Mac data dir isn't in the same place as the linux one.

rpdelaney commented 2 years ago

I suggest following the freedesktop.org XDG base directory specification rather than defaulting ~/.mcfly. This solves all platform interoperability issues cleanly.

praveenperera commented 2 years ago

Closed by: https://github.com/cantino/mcfly/pull/244

utkarshgupta137 commented 1 year ago

This issue is still not fixed on macOS.

cantino commented 1 year ago

What issue @utkarshgupta137 ?

utkarshgupta137 commented 1 year ago

The path is not configurable on macOS. The XDG_DATA_HOME/XDG_CACHE_HOME is only respected on Linux, not macOS or Windows.

utkarshgupta137 commented 1 year ago

@cantino Are you working on a fix? Or would you accept a PR? If so, should I just replace the locations?

cantino commented 1 year ago

I am not, a PR would be welcome.

o6uoq commented 5 months ago

https://github.com/cantino/mcfly/pull/349 has been open since April 2023. Any updates on this configuration being baked into McFly?

praveenperera commented 5 months ago

@o6uoq Closed by: https://github.com/cantino/mcfly/pull/244

utkarshgupta137 commented 5 months ago

I don't think the problem is solved by that PR, since history.db is stored along with configuration. Also, there is no configurability on macOS, since XDG is not respected currently.