Implement support for loading and unloading .env files #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This provides two new functions for loading and unloading
.env files, tacklebox now also loads any .env file it finds
in the base tackle directory on startup.
This is my first attempt at loading/unloading env files, unfortunatly I had to add a special case for $PATH as fish treats it specially. I am also relying on the new
string
built in thats part of the fish 2.3 beta as it makes life a lot simpler.Currently its just loading all the .env files in the tackle directory I have a example here https://github.com/simotek/tackle/tree/simotek-theme eventually ill clean up that theme enough for general use.
I was also thinking of setting it up to load .env files in the theme directory as files like https://github.com/simotek/tackle/blob/simotek-theme/simotekfish-colors.env are probably better as part of the theme.