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

Specify cache dir with BAT_CACHE_DIR #869

Merged
merged 3 commits into from
Mar 18, 2020

Conversation

neuronull
Copy link
Contributor

  • if set, BAT_CACHE_DIR is used. otherwise use OS default.

Closes #829

- if set, BAT_CACHE_DIR is used. otherwise use OS default.
@neuronull
Copy link
Contributor Author

$ env | grep BAT

$ ./target/debug/bat --cache-dir
/home/<user>/.cache/bat

$ export BAT_CACHE_PATH=/tmp/bat_cache

$ ./target/debug/bat --cache-dir
/tmp/bat_cache

$ unset BAT_CACHE_PATH

$ ./target/debug/bat --cache-dir
/home/<user>/.cache/bat

src/dirs.rs Outdated Show resolved Hide resolved
src/dirs.rs Outdated Show resolved Hide resolved
Copy link
Owner

@sharkdp sharkdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much!

This looks good so far, I added two inline comments.

src/dirs.rs Outdated Show resolved Hide resolved
Copy link
Owner

@sharkdp sharkdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the updates.

@sharkdp sharkdp merged commit b1b8add into sharkdp:master Mar 18, 2020
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

Successfully merging this pull request may close these issues.

Specify a directory for cache
2 participants