-
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
Glob for *.bash properly when path contains spaces #1902
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greetings - Thanks for taking the time to debug and create a PR, as well as the thorough description of the issue !
I've confirmed the issue (and fix) locally.
I have a small suggestion to keep the CUSTOM
variable so we only have to do the complex definition once.
72931a2
to
8a2d1a0
Compare
After just force-pushing twice, I remembered that the contribution document says not to do that... sorry, I'll be more careful. |
Would someone do me the solid of enabling the tests to run for this PR? My main branch is so far ahead of this that I'd just like to see that BATS approves of my code. 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @gaelicWizard
I have been going through your PRs and wow- you did quite a lot of great quality changes!
Thank you for your efforts, and like always thanks @davidpfarrell for your thoughtful CR.
I am also sorry that I was not quite available in the last few months. I will try to have more time to look at things- considering the effort you put in 😄
I've rebased on current master branch, and squashed some of my intermediate commits. Anything else needed for this PR? 😃 |
hi @gaelicWizard, seems like you need to |
I've marked this PR as draft as I'm rebasing it on a different branch in my repo. |
d88f4bb
to
0f5aa4a
Compare
93593da
to
a54fce8
Compare
d10a278
to
25f14eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
61d5bcf
to
1d2e653
Compare
Rebased on master and removed some no-longer-relevant comments and unnecessary shellcheck directives. |
bac5fb6
to
407c9a7
Compare
Rebased on current master and ready to go! |
1b998e1
to
77a032b
Compare
4ab63fa
to
ee12f5f
Compare
Hi @davidpfarrell, wanna take another look? |
- `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 - remove 10-years-deprecated backwards compatibility: Deprecated in `b59ee658f78ec6ff8c6c2754216e0322b7fe18e2` dated 2011-10-29.
cd96fb9
to
c41969f
Compare
Long time has passed since the review
Description
Instead of $LIB and $CUSTOM variables, use the glob pattern in the foreach statement quoting the path but not the glob. Quoting the glob will make it not a glob, but when expanding the not-quoted $LIB or $CUSTOM variable Bash will split all words, including spaces in the actual path. This helps towards #1696.
This is literally one of the examples under Code Style on the contribution page.
Closes #1435.
Motivation and Context
This resolves the failure to source the files under $BASH_IT/lib when there is any space in $BASH_IT, such as when the user name contains a space or the path to the repository contains a space.
You can reproduce this with a user short name with a space, which is possible with the "MacBuddy" default setup assistant on Mac OS X, or if $BASH_IT is set to a path containing an (additional) space, like if I cloned to ~/Library/Application Support/Bash It. Windows commonly has user names with spaces.
How Has This Been Tested?
This is my current working branch since July on my system where $BASH_IT is ~/Library/Application Support/Bash It (that's two spaces in the path).
Types of changes
Checklist:
clean_files.txt
and formatted it usinglint_clean_files.sh
.