shundle

15 Nov 2013

Shundle is a general sh plugin manager I wrote when I realized how messy my ~/.bashrc was getting. It also helped to learn more about how to write portable sh code. It’s not intend to be used by everyone, actually it could scare a lot of people =)

However if you feel brave enough to test it, go ahead, it’s free software!

I’ve created few plugins around it; colorize, aliazator, eternalize, the idea is that shundle loads/unloads as many as the user wishes, righ now it adds 0m0.110 seconds with all the plugins enabled and 0m0.048s without any to the average bash startup time (working in getting more shells supported). Note: I tested it in a dual core cpu.

Plugins are enabled by placing a Bundle= directive in the shell profile file (~/.bashrc in bash), eg. enabling eternalize:

Bundle='javier-lopez/shundle-plugins/aliazator.git'

After doing it, shundle requires to be downloaded:

$ git clone --depth=1 https://github.com/javier-lopez/shundle ~/.shundle/bundle/shundle

Then, shundle will setup everything else, (a new tab will require to be open, or the shell profile requires to be sourced):

$ . ~/.bashrc #source your .zshrc or the shell initialization file you use
$ shundle install

Shundle will install the desired plugins and after reloading the session (or openning another tab) a new theme with several commands will be available (aliazator, eternalize, etc). How is different to downloading scripts and placing them in /usr/local/bin or in $PATH?, well, the idea is that eventually only the shell profile file gets tracked to replicate an unique (cli) environment anywhere.