-
Notifications
You must be signed in to change notification settings - Fork 2.3k
new plugin: config plugin will load/save your bash-it configuration #328
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
Conversation
This is what a config repo looks like |
BASH_IT_CONFIG_PATH="${BASH_IT}/.config" | ||
GIT="/usr/bin/env git" | ||
|
||
_config-read-git-url() |
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.
Can you use the function _config-read-git-url ()
syntax here? PR #315 fixed all of these to avoid parse errors that we were exposing ourselves to.
This looks pretty awesome and something we definitely need. I actually ended up writing my own simple thing just parsing the output to |
@tswicegood Hi Travis. I hope you can use this PR. Unfortunately, I stopped using bash-it after forking Mathias' dotfiles, which really clicked for me. I had a few issues with bash-it:
If these issues are addressed I'd definitely come back to bash-it. I apologize if I'm not going to be updating this PR, because I don't have the time right now; I can anwer any questions you may have, however. thanks for the good work |
To address the second of your items (dotfiles), I'm using Homesick, which allows the linking of dotfiles and directories into your home directory. My Dotfiles repo is based on that. I've used a script in my Dotfiles repo to sync enabling/disabling plugins across installations. It works, but isn't great, since it requires manual work to update. A command to do the same would be fantastic, if it was possible to sync using Homesick even better. |
For what it's worth, I think the real benefit of bash-it is the ease of separating functionality into files in an organized manner, which is something that's missing from most other dotfile repos. I don't want to end up with a huge file that contains all of the aliases. Bash-it lets me select the ones I want to use, and it allows me to be flexible with that, e.g. for different configuration for home and work. I haven't found that with simple dotfile repos. |
@nwinkler Agreed, that's a 👍 for bash-it. |
Hey @boneskull -- thanks for the update. Since @nwinkler mentioned point 2, let me elaborate. I think something like Homesick is probably where the code for managing dotfiles belongs. bash-it (at least as I see it) is meant to handle simple bash setup that falls into a few categories:
I don't think managing things like To address point 1: I actually really dig the idea of allowing code to percolate outside of the main repo. That'd definitely speed up iteration as people could release their own code without having to wait to get it merged into this repo, but would make discovery a lot harder. You might have some awesome plugins, but how would people find them? Going the available + enabled route allows us to ship the kitchen sink, but then you can choose what you want to turn on instead of everything being there (which is how it used to be). Hope you consider sticking around. We could definitely use some new blood and ideas helping us move this forward. I think bash-it's pretty awesome, but I also know there's tons of room for improvement. This PR shows a lot of promise and ability on your end… we could use another set of hands making it even more awesome. |
I was originally thinking that simply keeping the extensions in their own repo and installing on-demand would work (like Hubot or something). But then you still have the PR problem. So you'd need a registry. I haven't written a registry myself, but it doesn't seem very difficult to have something basic. Your package manager registry could be a pretty simple script living on, say, Heroku. It would respond to
At this point it would check If
returns plain text:
To the user, they would Bash-it would receive the plain-text repo URL, then clone this repo, This sounds pretty simple to me, but maybe I'm overlooking something. |
this is very interesting, but kinda superseded by #1865 |
So basically what you do:
config
plugin enabledsave-bash-it
will prompt for your repo URL, then it will save information on your enabled plugins, aliases and completions.bash_profile
under version control$BASH_IT/.config
), commits, then pushesSo if you change your
.bash_profile
, enable/disable any plugins, or create custom files, runsave-bash-it
again and your changes will be pushed to your repo.Then, log into some other machine,
load-bash-it
will prompt you for your repo URL, clone your repo, then read the config files and enable whatever.bash_profile
, if you have that tooThis works for me, but may be a bit heavy-handed in places. Could use some prompts or something because of the files getting overwritten and
rm -f
'd all over the place.Let me know what you think.