Cleanup and load libraries explicitly #1823
Closed
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.
Description
shfmt
Motivation and Context
I noticed that
PROMPT_COMMAND
didn't have uniform delimiters and I went digging for a reason.I found that
bash-preexec
wants total control over this and DEBUG trap. So, if bash-it wants it to be a first-class option,it will need to be loaded last.
This issue is loosely related to our discussion about vendoring and how to load libraries (@buhl @NoahGorny).
In that thread I argue that most of these loops are premature optimizations, given that our list of libraries isn't that long,
and in the section where we load theme components, we are perfectly happy to source them explicitly.
This is how I would do that.
I haven't removed the
init.d
directory because I assume it was made for good reason, but I don't see it, at least for preexec.However, I want a discussion about it's efficacy before I return to using it or remove the file all together.
How Has This Been Tested?
manually and with bats
Types of changes
Checklist:
clean_files.txt
and formatted it usinglint_clean_files.sh
.