Takes your shell from Bland to Grand!
Installs Bash it which is an easy way to make your bash shell awesome
apt
cookbookyum
cookbookgit
cookbook
The node['bash-it']['instance_default']
attributes are parsed out as defaults for the bash_it_instance
resource
The node['bash-it']['repository']
and node['bash-it']['revision']
attributes are used to specify the git repo and revision to clone down bash-it from. It defaults to the official bash-it repo
The node['bash-it']['users']
attribute is an array of usernames that should have bash-it installed accoring to the instance defaults. FYI: I will probably deprecate this in the future
See attributes/default.rb for more details
- Apt & Yum Recipes
- Install Git
- Configure Bash it for users specified in
node['bash-it']['users']
This recipe is not nessesary so long as git is installed before using the bash_it_instance
LWRP
This recipe will install a global version of bash-it for all users on the system. I don't like this approach personally because it is not flexible and a shell should be configurable to a user's own preferances when possible
In any event, to use this recipe you just need to include bash-it::global
Note: You might need the bash-it::default
recipe to install dependencies as well
This recipe will use the node['bash-it']['instance_default']
keys to determine plugins, aliases, ect.
To install Bash it for a user you simply put bash_it_instance <username>
in your recipe. This is best placed in your users cookbook if you have one.
Default attributes for the bash_it_instance
are stored as node attributes in the node['bash-it']['instance_default']
hash so that you can easily override the defaults
# Install Bash it for eddie's user
bash_it_instance 'edhurtig'
# Install Bash it for the root user
bash_it_instance 'root' do
home '/root'
end
# Instance with a different theme
bash_it_instance 'edhurtig' do
theme 'candy'
end
# the full set of options
bash_it_instance 'edhurtig' do
home '/home/edhurtig-custom' # A custom home dir
theme 'dulice' # Any Bash it theme
git '[email protected]' # Custom Git Server
scm_check true # Whether to check for SCM continuously
plugins %w( base history ruby ) # An array of plugins that should be active
aliases %w( git rails tmux ) # An array of aliases that should be active
completions %w( git ssh tmux test-kitchen ) # An array of completions that should be active
end
Include this recipe in a wrapper cookbook:
depends 'bash-it', '~> 1.0'
# Install bash it globally using the node['bash-it']['instance_default'] attributes
include_recipe 'bash-it::global'
# Install an instance of bash-it for a specific user using the defaults
bash_it_instance 'edhurtig'
See the Issues
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write your change
- Write tests for your change (if applicable)
- Run the tests with
kitchen test
, ensuring they all pass - Submit a Pull Request using Github
Author:: Eddie Hurtig ([email protected])