-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
DRAFT: Use XDG Base Directory Specification folder locations #1904
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Interesting, we also want to ship bash-it in package managers- you can take a look at this - #1819 |
a4b06ad
to
a9fa102
Compare
cf1c3f4
to
f84bac6
Compare
This PR is mostly waiting on there being more to do with this. Once Bash It is published in platform package managers, then it will be much more useful to refer to the user's data or configuration, but currently the whole Bash It repo is in the user's folder so... |
bca793b
to
002940f
Compare
Test was failing only on Mac OS X for some reason, so refactor a little.
Couldn't even `shellcheck` until I did a first pass...too much noise! ♥
SC2076 SC2091 SC2004 SC2086 SC2207
1. `$text_black` isn't a parameter provided by _Bash It_. Typo? 2. `$bold_yellow` is meant for prompt strings and putputs `\[`; ditto `$bold_red`. 3. The color was never returned to normal after.
My apologies to future `git blame` hunters ♥
Alsö, fix tests to load `lib/colors` instead of `lib/appearance`...wut Alsö, `short-circuit _has_colors()`: If we already looked up colors, and we already have them, then don't run `tput` again. My apologies to future `git blame` hunters ♥
...to `_bash-it-log-message()`. alsö, add common log levels with common names.
1dd5441
to
6c127f3
Compare
...to replace `_set-prefix-based-on-path()` in `scripts/reloader`.
- `shfmt`, `shellcheck` - Clean up legacy/compatibility code to simpler control flow - Move theme stuff down to where themes are handled - Don't use `**` as _Bash It_ has never before set `globstar`; this eliminates varying behavior by environment; this alsö fixes users having any not-enabled themes under their custom dir. - Lose weird Mac-specific alternate shell startup file (Bash loads startup files on Mac the same as it does on any other *nix system.) - Place `composure.sh` init all in one place
Eliminate the separate loop for `vendor/init.d` since it's just as easy to glob it in the `lib` loop.
This adds *three* lines to `bash_it.sh`, and two to `plugin/base`. Just not worth an extra file requiring special handling.
Rewrite globbing per `shellcheck`'s SC2013 recommendations, and standardize whitespace.
Fix theme file path globbing when $BASH_IT contains any spaces. My apologies to future `git blame` hunters ♥
Use $XDG_CACHE_HOME environment constant instead of placing a tmp/cache folder inside the bash-it data repo. If not defined, fall back to current behavior.
Locate the bookmarks file in $XDG_STATE_HOME, and migrate an existing file from the old location if it exists.
catull
pushed a commit
to catull/bash-it
that referenced
this pull request
Oct 21, 2021
Use $XDG_CACHE_HOME environment constant instead of placing a tmp/cache folder inside the bash-it data repo. If not defined, fall back to current behavior. This resolves Bash-it#1904.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
WORK-IN-PROGRESS
Description
This is a general attempt to adopt XDG_* paths as appropriate, starting with XDG_CACHE_HOME. Likely this will need some changes to internals, such as where "$BASH_IT" points to by default, and where we store configuration files relating to #1819.
Motivation and Context
Adopting the XDG BaseDir spec allows us to be good platform citizens no matter which platform we're on.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
clean_files.txt
and formatted it usinglint_clean_files.sh
.