You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Discussion: My work refactoring bash-It and possible integration paths #1678
I am a huge fan of bash-it, but the more I used it, the more I ran into some issues. Thats when I started to dig into the codebase, open PRs and contribute to the codebase. It is however, after digging deeper into some areas that I found myself moving lots of parts and restructuring big chunks the code. Moreover, I found various inconsistencies when it came to code style and adherence to bash best practices.
gaudi-bash is my fork with lots of opinionated changes in the code to suit my OCD-like nature. I am by no means a bash expert but I tried my best to conform to the best practices in here.
I also found lots of unused and redundant code, a huge part of that was to ensure backward compatibility with the older versions of bash-it. Sometimes, it is better to start fresh and put the past behind us!
The main changes in this repo are:
Split the core engine from the components (plugins, aliases, completions and themes to be done soon)
Split the code into smaller set of files e.g., components, helpers, utils, etc.
Ensure consistent way of writing bash code (function definitions, comments, etc.)
Following as much as possible bash best practices
Make sure to comply with shellcheck as much as possible
Ensure high coverage unit tests for all core functions and split test functions as well into small units
Merged some of the work from bash-it issues and open PRs that made sense to me
Adding more functions like bash-it backup and bash-it restore
Again, I am by no means a bash expert but tried my best to work something that made sense to me, so I hope some of these decisions make sense to you as well :)
As I said in #1664 (comment), I think the way forward for merging this into the mainline is by creating small PRs and make this as many incremental changes as we can
Well, I guess we need to start at the lowest level... Can you walk us through the first item on your list (split core engine from components)? What does that entail?
@ahmadassaf, since you uploaded a new repository rather than forking on GitHub, it's kind of hard to compare your changes without specifically spending time to configure a local git repo for this purpose. That makes it harder for anyone who isn't already invested specifically in your fork to work with it. I can post instructions for re-creating your GitHub repo as a fork of this one and then I'll be happy to help bring incremental improvements upstream. Are you still interested in contributing upstream?
hello all! sorry for being absent! yes I am definitely keen to contribute to the upstream. I think the repo is in a pretty stable version and I have been using my fork since then.
Please let me know how to move forward and am keen to kick this off again!
@ahmadassaf, since you uploaded a new repository rather than forking on GitHub, it's kind of hard to compare your changes without specifically spending time to configure a local git repo for this purpose. That makes it harder for anyone who isn't already invested specifically in your fork to work with it. I can post instructions for re-creating your GitHub repo as a fork of this one and then I'll be happy to help bring incremental improvements upstream. Are you still interested in contributing upstream?
@ahmadassaf, the most helpful thing from my point of view would be to make your repo be a fork of the upstream repo. Would you be open to this if I post instructions?
Short version: delete the repo from GitHub.com, fork the main repo on GitHub.com, rename on GitHub.com to match your preexisting repo (so the url is the same as it was), then force-push from your local repo. The result will be that the "new" forked repo will have exactly the code you have in there now, but GitHub will now treat it as a fork and make it really easy to compare and do pull requests and all that stuff.
At that point, I'd be happy to help do the leg work of bringing in improvements piecemeal. I've accidentally started doing a lot of improvements myself so I've already got some momentum going with the workflow.
Note: I'm not a member of the project, just another contributor like yourself so if @NoahGorny or @davidpfarrell or another maintainer says something else please listen to them. 😃
The way we should merge your changes upstream should go by creating small PRs with specific commits that add specific functionality. This will require a fork, but after doing this chore and opening up PRs I will gladly take a look and try to merge them here!
As a question before making a PR. Does it make sense to you guys to separate the main "core" of bash-it from the plugins, completions, themes, etc. @NoahGorny@gaelicWizard@nwinkler
Example is in here whereas everything was moved into a components folder and will be fetched as submodules.
As a question before making a PR. Does it make sense to you guys to separate the main "core" of bash-it from the plugins, completions, themes, etc. @NoahGorny@gaelicWizard@nwinkler
Example is in here whereas everything was moved into a components folder and will be fetched as submodules.
If so, then happy to make that as PR 1
I think that splitting part of the repo into a submodule will not be very helpful, as it will be harder to maintain. I personally dislike submodules anyway.
I think we can incorporate your changes without actually splitting part of the repo into a submodule.
I too have had the urge to do a little spring cleaning 😸
I second the notion of splitting this into little manageable PR's.
I hope to soon have the time to go through your suggested changes @ahmadassaf
Activity
NoahGorny commentedon Oct 15, 2020
As I said in #1664 (comment), I think the way forward for merging this into the mainline is by creating small PRs and make this as many incremental changes as we can
ahmadassaf commentedon Oct 15, 2020
@NoahGornyI agree with the approach but I am wondering what changes/things you would like to see moving over?
nwinkler commentedon Oct 16, 2020
Well, I guess we need to start at the lowest level... Can you walk us through the first item on your list (split core engine from components)? What does that entail?
NoahGorny commentedon Dec 6, 2020
gentle ping @ahmadassaf
gaelicWizard commentedon Aug 22, 2021
@ahmadassaf, since you uploaded a new repository rather than forking on GitHub, it's kind of hard to compare your changes without specifically spending time to configure a local git repo for this purpose. That makes it harder for anyone who isn't already invested specifically in your fork to work with it. I can post instructions for re-creating your GitHub repo as a fork of this one and then I'll be happy to help bring incremental improvements upstream. Are you still interested in contributing upstream?
NoahGorny commentedon Sep 10, 2021
I am reopening this as this is an important issue!
gaelicWizard commentedon Sep 10, 2021
I think the no-response bot needs some tweaking. For the moment, maybe remove the "needs response" label?
gaelicWizard commentedon Sep 10, 2021
Looking at his repo, it seems like it's been untouched since he submitted this issue.
ahmadassaf commentedon Sep 16, 2021
hello all! sorry for being absent! yes I am definitely keen to contribute to the upstream. I think the repo is in a pretty stable version and I have been using my fork since then.
Please let me know how to move forward and am keen to kick this off again!
gaelicWizard commentedon Sep 16, 2021
@ahmadassaf, the most helpful thing from my point of view would be to make your repo be a fork of the upstream repo. Would you be open to this if I post instructions?
Short version: delete the repo from GitHub.com, fork the main repo on GitHub.com, rename on GitHub.com to match your preexisting repo (so the url is the same as it was), then force-push from your local repo. The result will be that the "new" forked repo will have exactly the code you have in there now, but GitHub will now treat it as a fork and make it really easy to compare and do pull requests and all that stuff.
At that point, I'd be happy to help do the leg work of bringing in improvements piecemeal. I've accidentally started doing a lot of improvements myself so I've already got some momentum going with the workflow.
Note: I'm not a member of the project, just another contributor like yourself so if @NoahGorny or @davidpfarrell or another maintainer says something else please listen to them. 😃
NoahGorny commentedon Sep 16, 2021
The way we should merge your changes upstream should go by creating small PRs with specific commits that add specific functionality. This will require a fork, but after doing this chore and opening up PRs I will gladly take a look and try to merge them here!
ahmadassaf commentedon Sep 17, 2021
alright lads! will be a festive weekend then! looking forward to it
ahmadassaf commentedon Sep 21, 2021
update: I have made the fork and I am trying to wrap my head around what the hell did I do almost a year ago now! taking time but getting there
ahmadassaf commentedon Sep 21, 2021
As a question before making a PR. Does it make sense to you guys to separate the main "core" of bash-it from the plugins, completions, themes, etc. @NoahGorny @gaelicWizard @nwinkler
Example is in here whereas everything was moved into a components folder and will be fetched as submodules.
If so, then happy to make that as PR 1
NoahGorny commentedon Sep 23, 2021
I think that splitting part of the repo into a submodule will not be very helpful, as it will be harder to maintain. I personally dislike submodules anyway.
I think we can incorporate your changes without actually splitting part of the repo into a submodule.
Let me know what you think @ahmadassaf 😄
buhl commentedon Nov 29, 2021
I too have had the urge to do a little spring cleaning 😸
I second the notion of splitting this into little manageable PR's.
I hope to soon have the time to go through your suggested changes @ahmadassaf