importpw / import

`import` is a simple and fast module system for Bash and other Unix shells
https://import.sh
MIT License
338 stars 10 forks source link

Honor OS defaults for default cache location #42

Closed isotes closed 4 years ago

isotes commented 4 years ago

Note: this fixes the "$HOME folder bloat" mentioned in Issue #36 and follows OS conventions on Linux and Windows as mentioned in https://github.com/importpw/import/issues/36#issuecomment-660370606. For macOS it falls back to $HOME/.cache since handling macOS would require uname wrangling which I would prefer to avoid, mostly for #38. On my macOS installation $HOME/.cache already exists since it is used by other tools as well so it is a compromise I personally could live with.

Additionally, it renames the directory to import.pw to be easier to google.

Please let me know if you would prefer a different approach.

TooTallNate commented 4 years ago

This looks good to me, though ultimately I'd like to get the macOS paths correct as well. Like I mentioned in #38, I think this logic belongs in the import script itself, rather than outside of the script (and out of our control) in a snippet, so I don't mind the additional complexity.

isotes commented 4 years ago

Ok, I will update the PR with support for macOS

TooTallNate commented 4 years ago

Great, thank you!