-
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
lib/helpers: fixes, improvements, consolations, constellations, and a partridge in a pear tree #2061
Conversation
when i tried to install, i got a message `_bash-it-pluralize-component` command not found; after checking `utilities.bash` the correct function name was `_bash-it-component-pluralize`
a312e5a
to
58a9dc9
Compare
helpers.bash
helpers.bash
9d7c998
to
2b1f121
Compare
2b1f121
to
586e964
Compare
helpers.bash
- Allow direct installation by running `bash -c "$(curl -s https://raw.github.com/bash-it/bash-it/master/install.sh)"` - This depends on Bash-it#2061 due to unbound variables and a function name typo in `lib/helpers`
3483027
to
beea708
Compare
24881eb
to
377f92b
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.
Looks pretty well made, I had a few comments
df8301a
to
6f98e40
Compare
Alsö, don't `pushd`/`popd` when restarting shell.
c505603
to
f2bad2a
Compare
lib/utilities.bash
Outdated
enabled=($(compgen -G "$BASH_IT/$component_dir/enabled/*.$component.bash")) || | ||
enabled=($(compgen -G "$BASH_IT/enabled/*.$component.bash")) |
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.
Oh, haha, you picked that? 😅 I had made some very sketchy changes, which were half broken, but then I got in lack of time, so I pushed them to continue with those later. I see you reworked them to perfection though, so it's great! Also, unsetting array subscripts, damn, I never thought of that. It's perfect. I always did arr="${arr//i}"
, which would leave an empty member.
About compgen
, thanks for indicating that, it's important to me when I learn something from someone who's better at it. Usually, when I'm sure that the files I'm working with won't have something weird in their names, I let myself be more incautious. But yeah, it's better to always avoid bad practices (especially in bash it seems to be too easy to slip).
e822d44
to
f2bad2a
Compare
487181c
to
df1840b
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.
I think this is ready, there are some changes that are just not related, but they are simple enough im inclined to include them with this PR
- required arguments
We should fall back to the default location, not use an entirely different one.
…to `_bash-it-component-cache-clean()`
- Use normal `if`/`then`
df1840b
to
5957d18
Compare
Use new `composure.sh` feature to avoid `cite()`.
3660a64
to
0c0a895
Compare
0c0a895
to
789ede9
Compare
Description
helpers.bash
#2058,$remote_info
._bash-it-update()
._bash-it-component-cache*()
improvements.Motivation and Context
While working on my BATS branch, I found several codes needing fixen so here they are 😃
How Has This Been Tested?
Working on it...
Types of changes
Checklist:
clean_files.txt
and formatted it usinglint_clean_files.sh
.